git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' of github.com:paf31/purescript
b9188c2Phil Freeman
README.md+7−10
@@ -84,16 +84,13 @@ var Person = function (value) {
84 return { ctor: 'Person', value: value };
84 return { ctor: 'Person', value: value };
85};
85};
86
86
87−function showPerson(p) {
87+function showPerson(p) {
88− return (function (_0) {
89− if (_0.ctor === "Person") {
88+ if (p.ctor === "Person") {
90− var _1 = _0.value;
89+ return p.value.name + ", aged " + itoa(p.value.age)
91− var o = _1;
92− return o.name ++ ", aged " ++ numberToString(o.age);
93− }
90+ };
94− throw "Failed pattern match";
91+ throw "Failed pattern match"
95− })(p);
92+}
96−};
93+
97```
94```
98
95
99## Type System
96## Type System