Created
May 23, 2018 16:13
-
-
Save canonic-epicure/46cf994ac5a33b938a1552bfbad6a4a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Action = Flower | Upwards | Branch | |
data RndGen | |
RndNumGen : Type | |
RndNumGen = EffM Identity Action [RND] (const [RND]) | |
getRnd : RndNumGen -> (Action, RndNumGen) | |
getRnd prev = | |
let | |
(Id action) = run prev | |
in | |
(action, next) | |
where | |
next : RndNumGen | |
next = do | |
prev | |
rndSelect' $ [ Flower, Branch, Upwards, Upwards, Upwards ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment