This file contains 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
args = # something | |
Result.try { f(args) } | |
.and_then { |f_output| g(f_output) } | |
.finally( | |
success: proc { |g_output| rended :view }, | |
failure: proc { |error| flash[:error] = error.to_s } | |
) |
This file contains 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
module 'test' ['f'/0, | |
'module_info'/0, | |
'module_info'/1, | |
'three'/0] | |
attributes [] | |
'f'/0 = | |
%% Line 5 | |
fun () -> | |
%% Line 6 | |
( fun (_cor2) -> |
This file contains 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
public final class Functio { | |
abstract static class N1<T, U> { | |
abstract U apply(T t); | |
} | |
abstract static class N2<T, U, V> extends N1<T, N1<U,V>> { | |
abstract V apply(T t, U u); | |
@Override | |
N1<U, V> apply(final T t) { |
This file contains 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
// This is the thing you give to Elm, your purely functional core, | |
// which exposes init, view, and update. | |
const app = require('./business-logic') | |
// This represents the implementations for all the side effects | |
// that your program knows how to requests. | |
// There is only one public function, perform(cmd: Cmd<Msg>) -> Promise<Msg>. |
This file contains 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
#!/usr/bin/env bash | |
# https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142 | |
# | |
# Put these lines in your .travis.yml | |
# | |
# install: | |
# - source <(curl -sSL https://gist.githubusercontent.com/hkgumbs/a434d214628147955f73ff7a7ce4c22c/raw) | |
# - npm install -g elm elm-test elm-format # etc | |
# |
This file contains 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
// JSON API | |
const app = require("express")(); | |
const bodyParser = require("body-parser"); | |
app.use(bodyParser.json()) | |
// COMPILE |
This file contains 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
# Initially based on https://github.com/sonnym/jekyll_elm | |
# | |
# USAGE: | |
# Copy/paste this file into the `_plugins` directory of your Jekyll project. | |
# For every .elm file in your project, it will generate a .js file in your site | |
# using the same name and relative path. | |
# | |
# As-is, the converter expects the following directory structure: | |
# | |
# your-jekyll-project/ |
This file contains 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
module Idris exposing (..) | |
type Num x | |
= Z | |
| S (Num x) | |
type Vect ln a | |
= Nil |
This file contains 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
source 'https://rubygems.org' | |
gem 'twitter' |
This file contains 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
elm-stuff |
OlderNewer