Skip to content

Commit

Permalink
Add type annotation to function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras committed Dec 8, 2024
1 parent 1d0f2ab commit 4c81a63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/strain/.meta/src/example.art
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
keep: function [values fn][
keep: function [values :block fn :literal :function][
fold.seed:[] values [acc value] [
print value
switch call var 'fn @[value] -> insert acc size acc value
-> acc
]
]

discard: function [values fn][
discard: function [values :block fn :literal :function][
fold.seed:[] values [acc value][
switch not? call var 'fn @[value] -> insert acc size acc value
-> acc
Expand Down
6 changes: 3 additions & 3 deletions exercises/practice/strain/src/strain.art
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
keep: function [values fn][
keep: function [values :block fn :literal :function][
panic "Please implement the keep function"
]

discard: function [values fn][
discard: function [values :block fn :literal :function][
panic "Please implement the discard function"
]
]

0 comments on commit 4c81a63

Please sign in to comment.