Created
August 1, 2020 23:18
-
-
Save bukzor/cb54ebaba856b487da759ba072f30af7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ head head.fm | |
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 https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (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