-
Notifications
You must be signed in to change notification settings - Fork 75
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 thata
could 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
Seqable
an alias that includes String- this ignores that other Clojure implementations have
Seqable
as 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
.