-
Notifications
You must be signed in to change notification settings - Fork 74
Strings
Ambrose Bonnaire-Sergeant edited this page Jan 12, 2013
·
1 revision
- Strings are not actually
Seqable, but are treated as such in the Clojure implementation
Two suggested fixes:
- hardcode
String <: (Seqable Character)- need to be careful that
(instance? Seqable a)does not infer thatacould be aString.- this seems unlikely to be a problem
- this just says: positions we can use
(Seqable Character), we can also useString
- need to be careful that
- make
Seqablean alias that includes String- this ignores that other Clojure implementations have
Seqableas a protocol
- this ignores that other Clojure implementations have
Arrays, Java maps and others also have this problem, each being hardcoded to behave as a Seqable.