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
;; map function | |
(define $map : [$A $B] ([(A -> B) {A}] -> {B}) | |
(lambda [$fn $xs] | |
(match xs (list something) | |
{[<nil> {}] | |
[<cons $x $rs> {(fn x) @(map fn rs)}]}))) | |
;; Ord type class | |
(type $Ordering {<Less> <Equal> <Greater>}) |
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
# build with | |
# docker build -t 'necrobious/haskell-ghc-7.8-64' . | |
FROM ubuntu:14.04 | |
MAINTAINER [email protected] | |
ENV DEBIAN_FRONTEND noninteractive | |
####### Install Dependencies ################################################### | |
RUN apt-get -y update |
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
// Count paths from (0, 0) to (N, N) in the NxN lattice graph using DFS. | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
using namespace std; | |
static unsigned long long cnt = 0; |
NewerOlder