This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Fun do | |
def arity(fun) do | |
case :erlang.fun_info(fun, :arity) do | |
{ :arity, arity } -> | |
arity | |
end | |
end | |
def adapt!(fun, 0) do | |
fn -> fun.([]) end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns overtone-playground.heart-murmur | |
(:use overtone.core | |
overtone.inst.sampled-piano | |
overtone.samples.piano)) | |
;; (boot-server) | |
;; (sampled-piano) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Reproducible randomness |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Punk do | |
def hip? do | |
true | |
end | |
def hop? do | |
hip? | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns jme3-example.core | |
(:import com.jme3.app.SimpleApplication | |
com.jme3.material.Material | |
com.jme3.math.Vector3f | |
com.jme3.scene.Geometry | |
com.jme3.scene.shape.Box | |
com.jme3.texture.Texture)) | |
(defn application | |
"Create an jMonkeyEngine application." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functions for defining and executing Hystrix dependency commands and collapers. | |
The definition of commands and collapers is separated from their instantiation and execution. | |
They are represented as plain Clojure maps (see below) which are later instantiated into | |
functional HystrixCommand or HystrixCollapser instances. | |
A command definition map can be passed to the execute, and queue functions | |
to invoke the command. | |
HystrixCommand |
NewerOlder