InfoQ Software Architects' Newsletter A monthly overview of things you need to know as an architect or aspiring architect. View an example

A strongly-typed functional programming language that compiles to JavaScript Benefits Compile to readable JavaScript and reuse existing JavaScript code easily An extensive collection of libraries for development of web applications, web servers, apps and more Excellent tooling and editor support with instant rebuilds An active community with many learning resources Build real-world applications us
この記事では, Haskellに用いられる「遅延評価」の仕組みを, 図に描いて説明します. 更に, 遅延評価版のフィボナッチ数の無限列を, JavaScriptで実装します. 遅延評価とはどのように動くのか, 考えて行きましょう. HaskellのコードとJavaScriptのコードの比較 Haskellでの x = y y = 10 と, JavaScriptの var x = y; var y = 10; というコードを考えてください. Haskellのコードは, これだけでは何も起こりません. print xとすると, x = y = 10 となって 10 が表示されます. 一方, JavaScriptのコードは var x = y; を評価した瞬間, 「ReferenceError: y is not defined」というエラーが出ます. 更に, main = let x = 1
IntroductionFay is a small programming language which has the following properties:A strict syntactic and semantic subset of HaskellStatically typedLazyPure by defaultCompiles to JavaScriptHas fundamental data types (Double, String, etc.) based upon what JS can supportHas a trivial foreign function interface to JavaScriptBecause Fay is intended to be small and simple, it relies on GHC, the Haskell
2008年4月27日日曜日 関数型(3) - 畳み込み fold, reduce 次の2つの計算を、畳み込み関数を使用して書く。 1 + 2 + 3 + 4 + 5 = 15 1 * 2 * 3 * 4 * 5 = 120 Scheme R Haskell JavaScript Erlang Ruby Scala Python OCaml PHP Scheme Gauche 0.8 $ gosh gosh> (fold (lambda (x y) (+ x y)) 0 '(1 2 3 4 5)) 15 gosh> (fold (lambda (x y) (* x y)) 1 '(1 2 3 4 5)) 120 gosh> (exit) ➢ 簡略化できる $ gosh gosh> (fold + 0 '(1 2 3 4 5)) 15 gosh> (fold * 1 '(1 2 3
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く