Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$ head
head.splitc(c: Char, xs: List(Char)): List(List(Char))
case xs:
| nil => List.nil<List(Char)>;
| cons => if U16.eql(xs.head, c)
then List.cons<>(c, head.splitc(c, xs.tail))
else head.splitc(c, xs.tail);
head.splitc_example3 : _
head.splitc('x', ['a', 'x', 'b'])
$ fmio head.splitc_example3
(node:4113) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'comp' of undefined
at check (/home/bukzor/repo/Formality/node_modules/formality-lang/FormalityComp.js:273:27)
at check (/home/bukzor/repo/Formality/node_modules/formality-lang/FormalityComp.js:243:24)
at check (/home/bukzor/repo/Formality/node_modules/formality-lang/FormalityComp.js:243:24)
at Object.core_to_comp (/home/bukzor/repo/Formality/node_modules/formality-lang/FormalityComp.js:283:23)
at Object.compile (/home/bukzor/repo/Formality/node_modules/formality-lang/FormalityToJS.js:642:32)
at Object._io_ (/home/bukzor/repo/Formality/node_modules/formality-lang/bin/lib.js:208:18)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4113) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 1)
(node:4113) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.