Re: [racket] polymorphic functions

2012-10-14 Thread Asumu Takikawa
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

Re: [racket] polymorphic functions

2012-10-13 Thread Răzvan Rotaru
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

Re: [racket] polymorphic functions

2012-10-11 Thread Greg Hendershott
> 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

Re: [racket] polymorphic functions

2012-10-11 Thread Matthias Felleisen
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

[racket] polymorphic functions

2012-10-11 Thread Răzvan Rotaru
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