git.iko.soy
/
rowtype-yoga/purescript-native
readme
files
commits
refs
on
golang
help
sign in
More work on examples
80a4d8e
Phil Freeman
13 years ago
examples/Nested.ps
new file
+3
compare with golang
unified
split
@@ -0,0 +1,3 @@
1
+
data Extend r a = Extend { prev :: r a; next :: a }
2
+
3
+
data Matrix r a = Square (r (r a)) | Bigger (Matrix (Extend r) a)
examples/Operators.ps
+4
@@ -13,3 +13,7 @@ test4 = 1 `k` 2
13
test5 = 1 %% 2 %% 3
13
test5 = 1 %% 2 %% 3
14
14
15
test6 = ((\x -> x) `k` 2) 3
15
test6 = ((\x -> x) `k` 2) 3
16
+
17
+
(<>) = \s1 -> \s2 -> s1 ++ s2
18
+
19
+
test7 = "Hello" <> "World!"
examples/Patterns.ps
+4
@@ -2,3 +2,7 @@ test = \x -> case x of
2
{ str = "Foo", bool = true } -> true
2
{ str = "Foo", bool = true } -> true
3
{ str = "Bar", bool = b } -> b
3
{ str = "Bar", bool = b } -> b
4
_ -> false
4
_ -> false
5
+
6
+
f = \o -> case o of
7
+
{ foo = "Foo" } -> o.bar
8
+
_ -> 0
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