git.iko.soy
/
rowtype-yoga/purescript-native
readme
files
commits
refs
on
golang
help
sign in
Add failing Foldable testcase from #365
727f1f9
Dylan Simon
12 years ago
examples/failing/Foldable.purs
new file
+12
compare with golang
unified
split
@@ -0,0 +1,12 @@
1
+
module Main where
2
+
3
+
class Foldable f where
4
+
fold :: forall a b. (a -> b -> b) -> b -> f a -> b
5
+
size :: forall a. f a -> Number
6
+
7
+
instance foldableArray :: Foldable [] where
8
+
fold _ z [] = z
9
+
fold f z (x:xs) = x `f` (fold f z xs)
10
+
size = fold (const ((+) 1)) 0
11
+
12
+
x = size [1,2,3]
keys
esc 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