LoginSignup
0
0

More than 5 years have passed since last update.

Wisp : Libraries

Posted at

Wisp currently does not have much of a standard library, but why bother reinventing the wheel?

With Mori, you basically have the power of Clojure's data structures in your hands, effectively turning wisp into ClojureScript without the overhead of the entire JVM, plus it loads fast.

(ns com.hello-world 
  (:require [mori :as m]))
(def a (m.vector [1 2 3]))
(console.log (last (m.cons a 4)))
;=4

Or maybe you're just looking for some functional programming library to help you out as you do your work, like Rambda or lodash-fp.

(ns com.hello-world 
  (:require [ramda :as r]))
(def a [1 2 3])
(console.log (r.apply (Math.max a))) ;Showcasing interop from different libraries
;=3

So basically you can just mix and match any of the libraries available on the web on your own by doing npm install {library-name} --save and then use them directly from wisp, while enjoying the power of homoiconicity.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0