Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up
id:ayato_pさんのUnderscore.jsがちょっと便利だったので紹介してみる。を読んで思ったのが、Underscore.jsって最近使っていないな、ということでした。 というのも、1年くらい前までは、Underscore + Backboneで素のJavascriptを書いていたのですが、最近はClojureScriptを書くようになったからです。 はじめに ClojureScriptではJavascriptのオブジェクトは直接は使いません。 JavascriptでコレクションというとArrayになりますが、ClojureScriptではSequence,Vector,ListがありJavascriptのArrayとは別物です。 リテラルで、[1,2,3]と書くとVectorを表すことになります。そして","は空白と等価なので[1 2 3]と表現出来ます。 さて、Clojure
数日前@naoiwata師匠に「JavaScriptにパターンマッチってないですよね?」って聞いていたら「Underscore.jsならあるかも」みたいなことをそそのかされたので少し触ってみた。 Underscore.jsは関数型プログラミングをしたい人のための軽量ライブラリだという認識でだいたい良いと思います。最近、「JavaScriptで学ぶ関数型プログラミング」みたいな本も出ているみたいで、ちょっと中身みたけどUnderscore.jsの使い方ぽい感じの本だったので興味ある人は読んでみるといいかと*1。 ちなみに僕が求めているパターンマッチは文字列の正規表現ではなくて、関数型言語でいわれるようなパターンマッチ。Gaucheのutil.match的なやつ。 で、とりあえずUnderscore.jsなんぞということでバーっとひと通りみてみた。 Underscore.js だいたい大きく6
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く