1-- Taken from https://github.com/LiamGoodacre/purescript-fun-with-fundeps
5import Control.Monad.Eff.Console (log)
15type S15 n = S5 (S5 (S5 n))
17class NatPlus l r o | l r -> o
18instance natPlusZ :: NatPlus Z r r
19instance natPlusS :: (NatPlus l r o) => NatPlus (S l) r (S o)
21class NatMult l r o | l r -> o
22instance natMultZ :: NatMult Z n Z
23instance natMultS :: (NatMult m n r, NatPlus n r s) => NatMult (S m) n s
26foreign import data FVect :: * -> * -> *
27foreign import fnil :: forall e. FVect Z e
28foreign import fcons :: forall n e. e -> FVect n e -> FVect (S n) e
29foreign import fappend :: forall l r o e. (NatPlus l r o) => FVect l e -> FVect r e -> FVect o e
30foreign import fflatten :: forall f s t o. (NatMult f s o) => FVect f (FVect s t) -> FVect o t
31foreign import ftoArray :: forall n e. FVect n e -> Array e
33-- should be able to figure these out
34fsingleton x = fcons x fnil
35fexample = fcons 1 (fsingleton 2) `fappend` fsingleton 3 `fappend` fcons 4 (fsingleton 5)
36fexample2 = fexample `fappend` fexample `fappend` fexample
37fexample3 = fsingleton fexample `fappend` fsingleton fexample `fappend` fsingleton fexample
39fexample4 = fflatten fexample3
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list