Skip to content

Commit

Permalink
Add scanlPar diagram as for fold etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
vmchale committed Apr 22, 2022
1 parent adf26d5 commit cb98a03
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
Binary file added clash-prelude/doc/scanlPar.graffle
Binary file not shown.
127 changes: 127 additions & 0 deletions clash-prelude/doc/scanlPar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions clash-prelude/src/Clash/Sized/RTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ lazyT = tzipWith (flip const) (trepeat ())
-- 1 :> 3 :> 6 :> 10 :> Nil
--
-- The operator must be associative.
--
-- <<doc/scanlPar.svg>>
scanlPar :: KnownNat n
=> (a -> a -> a) -- ^ Must be associative
-> Vec (2^n) a -> Vec (2^n) a
Expand Down

0 comments on commit cb98a03

Please sign in to comment.