Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
data Fib1 = FoldNat
<
const (Cons One (Cons One Empty)),
(uncurry Cons) . ((uncurry Add) . (Head, Head . Tail), id)
>

View file

@ -0,0 +1,2 @@
type (Stream A?,,,Unfold) = gfix X. A? . X?
data Fib2 = Unfold ((outl, (uncurry Add, outl))) ((curry id) One One)

View file

@ -0,0 +1,11 @@
import Histo
data Fib3 = Histo . Memoize
<
const One,
(p1 =>
<
const One,
(p2 => Add (outl $p1) (outl $p2)). UnmakeCofree
> (outr $p1)) . UnmakeCofree
>