On 2012-10-13 23:18:27 +0300, Răzvan Rotaru wrote:
>@Greg, I know sequences and the functions around it, and they are indeed
>part of what I'm looking for. Essentially, I am speaking about replacing
>the core scheme functions, which work with lists, with generic versions
>that work
Hi,
> ad hoc polymorphism, aka generics (the better word to avoid confusion):
if you want (length '(1 2 4)) == (length "123") == (length (vector 1 2 3)),
> then the historical response is that such functions violates the
carefully chosen middl ground of Scheme, which wants the readers (of code)
to
> I realized recently that one thing I miss in Racket are polymorphic core
> functions (car, cdr, map, etc.). So I was wondering what it would take to
> make them polymorphic. What is the best way to implement a polymorphic
> function in Racket? Any ideas, suggestions and critics are mighty welcome
What do you mean by polymorphic?
parametric polymorphism: this is a type-level concept with no true material
counterpart on the dynamic level. Since Racket is untyped, you can't ask for
this. Naturally Typed Racket comes with first-class polymorphic functions.
ad hoc polymorphism, aka generi
Hi,
I realized recently that one thing I miss in Racket are polymorphic core
functions (car, cdr, map, etc.). So I was wondering what it would take to
make them polymorphic. What is the best way to implement a polymorphic
function in Racket? Any ideas, suggestions and critics are mighty welcome.
T
5 matches
Mail list logo