Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port clojure.zip #151

Closed
wants to merge 3 commits into from
Closed

Port clojure.zip #151

wants to merge 3 commits into from

Conversation

ruseel
Copy link
Contributor

@ruseel ruseel commented Sep 15, 2022

As part of issue #5, ported zip.clj to cljd/zip.cljc.

I had to use with-meta instead of using semantics of (fn [] ^:a [0]).

(meta ((fn [] ^:a [0])))

;; evaled in clojure
{:a true}

;; evaled in clojuredart 
nil 

And (loc 0) raised Exception: No extension of protocol IFn found for type IteratorSeq<dynamic>.
worked around by changing to (first loc)

all forms in zip.clj's rich comment, executed with same result.

JEONG, MunShik added 3 commits September 15, 2022 21:21
@cgrand
Copy link
Contributor

cgrand commented Sep 15, 2022

Nice! @dupuchba and I are going to fix the issues you encountered first. 🙏

@dupuchba
Copy link
Contributor

Very nice <3 - Going to look at this PR this weekend or Monday !

@dupuchba
Copy link
Contributor

@ruseel we fixed the bug, I'll push it tomorrow after writing some tests

@dupuchba
Copy link
Contributor

@ruseel it's pushed here 9996903

for the (loc 0) bug, can you paste the code that leads to this ?
Seq(s) don't implement IFn so it's normal but depending on how you get this error you should not have an IteratorSeq in the first place

@ruseel
Copy link
Contributor Author

ruseel commented Sep 17, 2022

for the (loc 0) bug, can you paste the code that leads to this ?

sorry. I could not reproduce it.

While I was working on this PR, there was time I missed
to require cljd.zip.replace, cljd.zip.next, cljd.zip.remove.

so I did it again but could not reproduce it


Using 9996903 And after just "s/clojure.zip/cljd.zip/"
all forms in zip.clj's rich comment, executed with same result.

@ruseel ruseel mentioned this pull request Sep 17, 2022
@ruseel ruseel closed this Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants