Groups
Groups
Sign in
Groups
Groups
4Clojure
Conversations
About
Send feedback
Help
This code works perfectly on KLIPSE but returns a null pointer exception error in 4clojure (problem #53)
24 views
Skip to first unread message
Elliot Atkins-Turkish
unread,
Feb 27, 2019, 3:48:33 PM
2/27/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 4Clojure
#(last(sort-by count (loop[c 0 r []]
(if(get % c)
(recur (+ c (count(loop[c2 c r2 [(get % c)]]
(if (and (= (get % c2) (dec (get % (inc c2)))) (get % c2))
(recur(inc c2)(conj r2 (get % (inc c2))))
r2
)
)))(conj r (loop[c2 c r2 [(get % c)]]
(if (and (= (get % c2) (dec (get % (inc c2)))) (get % c2))
(recur(inc c2)(conj r2 (get % (inc c2))))
r2
)
)))
r
)
)))
Screenshot from 2019-02-27 20-42-29.png
Screenshot from 2019-02-27 20-44-41.png
Reply all
Reply to author
Forward
0 new messages