-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slightly more general definition of take
#1064
Comments
You do not actually need
|
I think a generic If we make |
Related to generalizing the type of
The type currently has a |
I've wondered before about relaxing the type of |
I mean, we could just drop the I am skeptical of these generalizations though, as I think of arrays and streams as being rather different, and I think the current type nicely express the interaction between the two. To me taking or dropping |
And then you get, what, |
I was thinking you’d get []. The type defaulting engine will choose n=0, right? |
And one reason to consider making |
You'd only get |
Won’t the type system default n to 0? |
Yes, but you could make it take on any value by giving a signature |
No matter how long the second part is, its value would be undefined. That's that value that is at the end of an infinitely long list :) |
The more general type of |
If we really want to have infinitely long lists with values "at the end", we can just redefine kind |
Has anybody tried to design a language with ordinal array indexing? Seems like an interesting challenge... |
I think that the idea was to have
|
The type of |
I came up with a definition of
take
that allowstake`{front=inf}
(is it cheating to usezero
in this way?)This isn't pressing, but I haven't been able to come up with a more general definition of
drop
that allowsdrop`{front=inf} [0...] == []
.The text was updated successfully, but these errors were encountered: