Update core.clj

Rewrote in scala