Skip to content

Instantly share code, notes, and snippets.

update action model =
case action of
FromAction act->
let
(newData, fx ) = Form.update act model.form
in
({model|
form = newData},
Effects.map FormAction fx)
type Action =
FormAction Form.Action
| -- Other actions
@zkessin
zkessin / smell1.elm
Created January 4, 2016 16:39
smell
foo x =
case x of
Type y -> ...
_ -> ...
"use strict";
var system = require('system');
var page = require('webpage').create();
function waitFor(testFx, onReady, timeOutMillis) {
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timout is 3s
start = new Date().getTime(),
condition = false,
interval = setInterval(function() {
@zkessin
zkessin / WizardTest.elm
Created December 22, 2015 09:03
WizardTest.elm
module WizardTest where
import Graphics.Element exposing (tag)
import Check exposing (claim, that, is, true, false, for, quickCheck, suite)
import Check.Investigator exposing (tuple, tuple3, char, int, list, string)
import ElmTest exposing (equals, elementRunner)
claim_reverse_twice_yields_original =
claim
module ExampleCheck where
import Graphics.Element exposing (Element, show)
import Check.Investigator exposing (..)
import Check exposing (..)
claim_reverse_twice_yields_original =
claim
@zkessin
zkessin / gist:d7ef746e42e1f41c68c6
Created November 11, 2015 12:39
Snarl Compile errors
/root/snarl/_build/default/lib/mmath/c_src/bin_nif.c:36:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (unsigned i = 0 ; i < count; i++) {
^
/root/snarl/_build/default/lib/mmath/c_src/bin_nif.c:36:3: note: use option -std=c99 or -std=gnu99 to compile your code
/root/snarl/_build/default/lib/mmath/c_src/bin_nif.c:38:7: warning: implicit declaration of function ‘htonll’ [-Wimplicit-function-declaration]
last = FROM_DDB(vs[i]);
^
/root/snarl/_build/default/lib/mmath/c_src/bin_nif.c: In function ‘from_list’:
/root/snarl/_build/default/lib/mmath/c_src/bin_nif.c:71:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < count; i++) {
module CRMBox where
import Debug exposing (watch)
import Html exposing (..)
import Html.Events exposing (onBlur, targetValue, on)
import Html.Attributes exposing (style, selected)
import Effects
import Json.Encode
import Json.Decode
@zkessin
zkessin / DestinationNameBox.elm
Created October 21, 2015 12:36
DestinationNameBox.elm
module DestinationNameBox where
import Debug
import Html exposing (..)
import Html.Events exposing (onBlur, targetValue)
import StartApp.Simple exposing (start)
-- model
type alias Model = String
This file has been truncated, but you can view the full file.
%-*-Erlang-*-
-module(words).
-export([list/0]).
list() ->
[<<"A acid">>,<<"abacus major">>,<<"abacus pythagoricus">>,<<"A battery">>,
<<"abbey counter">>,<<"abbey laird">>,<<"abbey lands">>,<<"abbey lubber">>,
<<"abbot cloth">>,<<"Abbott papyrus">>,<<"abb wool">>,<<"A-b-c book">>,
<<"A-b-c method">>,<<"abdomino-uterotomy">>,<<"Abdul-baha">>,<<"a-be">>,
<<"aberrant duct">>,<<"aberration constant">>,<<"abiding place">>,