"times" edge case #175
DanielAjoy
started this conversation in
General
Replies: 2 comments
-
Sorry empty was defined this way
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Yeah makes sense. Plus the fix should be easy enough, I am just explicitly checking for non-zero integers. I'll handle this edge case as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While trying to define a function that creates a sequence of numbers provided a length of the list, I noticed that times does not accept 0 as a number of times to repeat a quote. I'd argue that repeating something 0 times is perfectly valid and useful:
(empty swap dup (pred dup (swons) dip) swap times pop) ^iota
Here is the problem:
Was expecting the empty list as the result
Beta Was this translation helpful? Give feedback.
All reactions