Skip to content

Commit

Permalink
fix example for switch
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-ba committed Nov 28, 2024
1 parent e56b1a4 commit cce3e0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AsyncRattus/Signal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ scanMap f p acc (a ::: as) = unbox p acc' ::: delay (scanMap f p acc' (adv as))
-- Example:
--
-- > xs: 1 2 3 4 5 6 7 8 9
-- > ys: 1 2 3 4 5 6
-- > ys: 1 2 3 4 5 6
-- >
-- > switch xs ys: 1 2 3 1 2 4 3 4 5 6
-- > switch xs ys: 1 2 3 1 2 3 4 5 6
switch :: Sig a -> O (Sig a) -> Sig a
switch (x ::: xs) d = x ::: delay (case select xs d of
Fst xs' d' -> switch xs' d'
Expand Down

0 comments on commit cce3e0c

Please sign in to comment.