Removed some comments that didn't make sense in context.
This commit is contained in:
parent
05f494be04
commit
8f353fce29
|
@ -26,8 +26,7 @@ vectorToList = (v, p) ->
|
||||||
if p >= v.length then return nil
|
if p >= v.length then return nil
|
||||||
# Annoying, but since lists are represented as nested arrays, they
|
# Annoying, but since lists are represented as nested arrays, they
|
||||||
# have to be intercepted first. The use of duck-typing here is
|
# have to be intercepted first. The use of duck-typing here is
|
||||||
# frustrating, but I suppose the eventual runtime will be doing
|
# frustrating.
|
||||||
# something like this anyway for base types.
|
|
||||||
item = if pairp(v[p]) then v[p] else if vectorp(v[p]) then vectorToList(v[p]) else v[p]
|
item = if pairp(v[p]) then v[p] else if vectorp(v[p]) then vectorToList(v[p]) else v[p]
|
||||||
cons(item, vectorToList(v, p + 1))
|
cons(item, vectorToList(v, p + 1))
|
||||||
|
|
||||||
|
@ -41,10 +40,6 @@ listToVector = (l, v = []) ->
|
||||||
v.push if pairp (car l) then listToVector(car l) else (car l)
|
v.push if pairp (car l) then listToVector(car l) else (car l)
|
||||||
listToVector (cdr l), v
|
listToVector (cdr l), v
|
||||||
|
|
||||||
# This is the simplified version. It can't be used stock with reader,
|
|
||||||
# because read() returns a rich version decorated with extra
|
|
||||||
# information.
|
|
||||||
|
|
||||||
metacadr = (m) ->
|
metacadr = (m) ->
|
||||||
seq = m.match(/c([ad]+)r/)[1].split('')
|
seq = m.match(/c([ad]+)r/)[1].split('')
|
||||||
return (l) ->
|
return (l) ->
|
||||||
|
|
Loading…
Reference in New Issue