$ erlc -S test.erl
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="generator" content="pandoc"> | |
<title></title> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<link rel="stylesheet" href="reveal.js/css/reveal.min.css"/> |
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
---- Prime sieve based on co-inductive streams | |
---- Taken from "Filters on coinductive streams, an application to | |
---- Eratosthenes’ sieve" by Yves Bertot | |
-- a 'stateful' filter | |
fm p n (x:xs) | (n < x) = fm p (n+p) (x:xs) | |
fm p n (x:xs) | (n == x) = fm p (n+p) xs | |
fm p n (x:xs) | (x < n) = x : (fm p n xs) | |
primes = sieve [2..] where |
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
-- Prevent working in non-sandboxed envs: | |
require-sandbox: True | |
-- Always enable test suite installation/building | |
tests: True | |
-- Always build documentation | |
documentation: True | |
-- Run (# of CPUs) build/fetch jobs in parallel | |
jobs: $ncpus | |
-- A few more options you might want to consider: | |
-- library-coverage: True |
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
#!/bin/bash | |
set -euo pipefail | |
FILE=$1 | |
FILENAME=$(basename "$FILE") | |
BROWSER=iceweasel | |
OK=0 |
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
happyNewToken action sts stk | |
= lexwrap(\tk -> | |
let cont i = happyDoAction i tk action sts stk in | |
case tk of { | |
alexEOF -> happyDoAction 18# tk action sts stk; | |
TokenLet -> cont 1#; | |
TokenIn -> cont 2#; | |
TokenFresh -> cont 3#; | |
TokenSpawn -> cont 4#; | |
TokenEnd -> cont 5#; |
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
-- A port of: http://semantic-domain.blogspot.com/2015/03/abstract-binding-trees.html | |
{-# LANGUAGE DeriveFunctor #-} | |
module ABT where | |
import qualified Data.Foldable as Foldable | |
import Data.Foldable (Foldable) | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
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
\documentclass[12pt]{article} | |
\usepackage{amsfonts, amsthm, amsmath} | |
\usepackage{verbatim} | |
\setlength{\textwidth}{6.5in} | |
\setlength{\oddsidemargin}{0in} | |
\setlength{\textheight}{9.5in} | |
\setlength{\topmargin}{0in} | |
\setlength{\headheight}{0in} | |
\setlength{\headsep}{0in} | |
\setlength{\parskip}{0pt} |
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
Return = case NumberGrouping of | |
default -> | |
Nums = [Nr || {Nr, _} <- ctree:get_nr(ResultTree, [{count, Limit}])], | |
Sublist = case Limit of | |
infinity -> | |
Numbers; | |
L when is_integer(L) -> | |
lists:sublist(number_utils:expand_list(Nums), Limit) | |
end, | |
number_utils:reduce_list(Sublist). |
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(foobar_rebar_plugin). | |
-export([ | |
pre_compile/2 | |
]). | |
pre_compile(Config, AppFile) -> | |
case is_explicit_plugin(Config) of | |
true -> | |
%% Do Stuff. |
OlderNewer