on master help sign in
Make some changes to the comments. Make proposed API clearer and get rid of comments about infix operators.
fa8f709evancz
core-elm/Automaton.elm+3−10
@@ -3,17 +3,8 @@ module Automaton where
3
3
4data Automaton a b = Automaton (a -> (b, Automaton a b))
4data Automaton a b = Automaton (a -> (b, Automaton a b))
5
5
6−-- Maybe once there are infix type constructors this could be
7−-- data a ~> b
8−-- or something like that.
9
6
10−
11−{--- API possibilies
12−
13−All names and types are up for debate!
7+{--- API possibilies: All names and types are up for debate!
14−
15−
16−How to run an automaton (some require typeclasses):
17
8
18run :: Automaton a b -> Signal a -> Signal b
9run :: Automaton a b -> Signal a -> Signal b
19run :: OrderedContainer c => Automaton a b -> c a -> c b
10run :: OrderedContainer c => Automaton a b -> c a -> c b
@@ -24,9 +15,11 @@ combine :: [Automaton a b] -> Automaton a [b]
24combine :: Container c => c (Automaton a b) -> Automaton a (c b)
15combine :: Container c => c (Automaton a b) -> Automaton a (c b)
25
16
26init :: b -> (a -> b -> b) -> Automaton a b
17init :: b -> (a -> b -> b) -> Automaton a b
18+
27init' :: s -> (a -> s -> (b,s)) -> Automaton a b
19init' :: s -> (a -> s -> (b,s)) -> Automaton a b
28
20
29count :: Automaton a Int
21count :: Automaton a Int
22+
30draggable :: Form -> Automaton (Bool,(Int,Int)) Form
23draggable :: Form -> Automaton (Bool,(Int,Int)) Form
31
24
32--}
25--}