8000 Strings · clojure/core.typed Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
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 that a could be a String.
      • this seems unlikely to be a problem
    • this just says: positions we can use (Seqable Character), we can also use String
  • make Seqable an alias that includes String
    • this ignores that other Clojure implementations have Seqable as a protocol

Arrays, Java maps and others also have this problem, each being hardcoded to behave as a Seqable.

Clone this wiki locally
0