Popularity
4.9
Declining
Activity
0.0
Stable
5
2
4
Monthly Downloads: 12
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1.1
perfect-vector-shuffle alternatives and similar packages
Based on the "Random" category.
Alternatively, view perfect-vector-shuffle alternatives based on common mentions on social networks and blogs.
-
rand-vars
Random variable library in Haskell, with Functor, Applicative and Monad instances.
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
Promo
www.sonarqube.org
Do you think we are missing an alternative of perfect-vector-shuffle or a related project?
README
perfect-vector-shuffle
A library providing Fisher--Yates in-place shuffles and related functionality.
As an example of how to use it:
module Main where
import Data.Vector
import Immutable.Shuffle
main :: IO ()
main =
do
shuffleMyVector >>= print
cycleMyVector >>= print
derangeMyVector >>= print
myVector :: Vector Int
myVector = fromList [1..10]
shuffleMyVector :: IO (Vector Int)
shuffleMyVector = shuffleM myVector
cycleMyVector :: IO (Vector Int)
cycleMyVector = maximalCycleM myVector
derangeMyVector :: IO (Vector Int)
derangeMyVector = derangementM myVector
> main
[2,8,1,5,10,9,7,3,6,4]
[6,8,4,10,9,2,5,7,3,1]
[8,5,4,1,10,9,3,6,2,7]
> main
[7,9,3,5,10,6,8,1,2,4]
[2,4,10,7,8,1,5,9,3,6]
[4,8,5,2,7,3,9,6,10,1]