-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jordan Mackie
committed
Apr 19, 2022
1 parent
35ba923
commit cd6acaa
Showing
4 changed files
with
181 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module If.Then.Else exports (..); | ||
|
||
|
||
octopus = | ||
match arm with | ||
| Arm1 -> "octopus" | ||
| Arm2 -> -- comment | ||
"octopus" | ||
| Arm3 -> | ||
-- comment | ||
"octopus" | ||
| Arm4 -> "octopus" -- comment | ||
| -- pls don't do this | ||
Arm5 -> "octopus" | ||
| Arm6 -- or this | ||
-> "octopus" | ||
-- | ||
-- | ||
-- | ||
| Arm.Arm7 -> if true then "octopus" else "octopus" | ||
| Arm.Arm8 -> | ||
if true then | ||
-- still octopus | ||
"octopus" | ||
else | ||
"octopus"; | ||
|
||
-- it's a classic | ||
map_maybe = (fn, maybe) -> | ||
-- it really is | ||
match maybe with | ||
| Just(a) -> fn(a) | ||
| Nothing -> Nothing; | ||
|
||
all_the_args = () -> | ||
match not_sure with | ||
| Foo(a, b, c, d) -> unit | ||
| Bar(Foo(a, b), b, Baz.Barrr, d) -> unit | ||
| Foo( | ||
-- comment | ||
a, | ||
B.B, | ||
-- comment | ||
C.C(a, b, c), | ||
D.D( | ||
-- comment | ||
d, | ||
), | ||
) -> unit; |
This file contains 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
This file contains 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
This file contains 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