Skip to content

Instantly share code, notes, and snippets.

View chrisschreiner's full-sized avatar

Chris Schreiner chrisschreiner

  • Schpaencoder
  • Oslo, Norway, Europe
View GitHub Profile
@chrisschreiner
chrisschreiner / Main.elm
Created June 8, 2016 06:33 — forked from pdamoc/Main.elm
Req msg with cache
module Main exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Events exposing (onClick)
import Req exposing (..)
import Dict exposing (Dict)
main : Program Never
@chrisschreiner
chrisschreiner / .gitignore
Created May 15, 2016 17:46 — forked from zemm/.gitignore
Creative Commons license chooser widget in Elm
elm-stuff
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
(use 'clojure.walk)
(defmacro with-iota [& body]
"Provides the local 'iota' which starts at 0 and automatically self-increments"
(let [iota (gensym "whatever-")]
`(let [~iota ~(atom -1)]
~@(map #(postwalk-replace {'iota `(swap! ~iota inc)} %) body))))
(with-iota
(let [a iota