http://swannodette.github.io/mori/
var l0 = mori.list(3, 4, 5);
var l1 = mori.cons(2, l0);
http://swannodette.github.io/mori/
var l0 = mori.list(3, 4, 5);
var l1 = mori.cons(2, l0);
| 2013-09-16 07:21:40,143 INFO com.buddycloud.mediaserver.Main - buddycloud Media Server HTTP server started! | |
| 2013-09-16 07:21:41,481 ERROR com.buddycloud.mediaserver.Main - Media Server XMPP Component could not be started. | |
| org.xmpp.component.ComponentException: java.io.EOFException: input contained no data | |
| at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:267) ~[whack.jar:na] | |
| at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:211) ~[whack.jar:na] | |
| at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:191) ~[whack.jar:na] | |
| at com.buddycloud.mediaserver.Main.createXMPPComponent(Main.java:138) ~[buddycloud-media-server-0.1.jar:na] | |
| at com.buddycloud.mediaserver.Main.startXMPPToolBox(Main.java:105) ~[buddycloud-media-server-0.1.jar:na] | |
| at com.buddycloud.mediaserver.Main.main(Main.java:51) ~[buddycloud-media-server-0.1.jar:na] | |
| Caused by: java.io.EOFException: in |
http://swannodette.github.io/mori/
var emptyVec = mori.vector();
var nonEmpty = mori.conj(emptyVec, 1, 2, 3, 4);
| ; A monad comprehension is a syntactic construct that translates | |
| ; synchronous-looking code into a callback-based implementation. Monads | |
| ; are a very general abstraction - which means that monad comprehensions | |
| ; have more expressive power than other sync-to-async code | |
| ; transformations. | |
| ; Here is an example that uses jQuery's $.get method to fetch resources: | |
| (def post-with-author (id) | |
| (for |
| (function(mod) { | |
| if (typeof exports == "object" && typeof module == "object") return mod(exports); // CommonJS | |
| if (typeof define == "function" && define.amd) return define(["exports"], mod); // AMD | |
| mod(self.acorn || (self.acorn = {})); // Plain browser env | |
| })(function(exports) { | |
| "use strict"; | |
| exports.version = "0.2.0"; | |
| /* ... */ |
| /* | |
| * Example of a state monad in use. This is adapted from an example on | |
| * the Haskell Wiki: | |
| * http://www.haskell.org/haskellwiki/State_Monad#Complete_and_Concrete_Example_1 | |
| */ | |
| require(['state', 'qunit'], function(state, qunit) { | |
| /* | |
| * playGame() is a recursive function that given an array of moves | |
| * defines an algorithm for constructing a final game score. Along |
| -- Converts unsigned integers to and from base36 representations | |
| module Numeric.Base36 ( | |
| readBase36 | |
| , showBase36 | |
| ) where | |
| import Data.Char (isAscii, isLetter, isDigit, ord, chr, toLower) | |
| import Numeric (readInt, showIntAtBase) |
| $.flatMap = function(promise, f) { | |
| var deferred = $.Deferred(); | |
| function reject(/* arguments */) { | |
| // The reject() method puts a deferred into its failure | |
| // state. | |
| deferred.reject.apply(deferred, arguments); | |
| } | |
| promise.then(function(/* values... */) { |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>iFrame memory leak prevention test</title> | |
| </head> | |
| <body> | |
| <h1>iFrame memory leak prevention test (void)</h1> | |
| <p>In IE up through version 8 adding an iframe to a page and | |
| removing it produces a memory leak in some cases. The pattern |
| function f() {} | |
| f.prototype = { i: 10 }; | |
| var i = new f(); | |
| f.prototype = { j: 11 }; | |
| var j = new f(); | |
| equal(i.i, ?); | |
| equal(i.j, ?); | |
| equal(j.i, ?); |