Just regular numbers, like
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
module Context | |
( T() | |
, empty | |
, add | |
, extend, singleton | |
, assign, assignment | |
, apply, accumulate | |
) | |
where |
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
import Control.Monad (when) | |
import Data.Foldable (for_) | |
import System.Directory (doesDirectoryExist, doesFileExist, listDirectory) | |
import System.FilePath ((</>), takeExtension) | |
import System.Environment (getArgs) | |
inode dirAction fileAction = go |
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
package main | |
import ( | |
"fmt" | |
"image/color" | |
) | |
/* | |
The idea is to make "better minecraft", essentially. |
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
% Type variable. | |
% | |
tvar(A) :- var(A). | |
% Type application. | |
% | |
% The `forall` is forbidden as constructor name, arglist must be non-empty. | |
% | |
tapp(FX, F, Xs) :- FX =.. [F | Xs], F \= forall, F \= prod, F \= sum, Xs \= []. |
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
{-# language GeneralizedNewtypeDeriving #-} | |
{-# language DeriveFunctor #-} | |
{-# language LambdaCase #-} | |
{-# language FlexibleInstances #-} | |
import Control.Applicative (Alternative (..), optional) | |
import Control.Category ((>>>)) | |
import Control.Monad (ap, void, guard) |
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
{-# language NamedFieldPuns #-} | |
{-# language TypeSynonymInstances #-} | |
{-# language FlexibleInstances #-} | |
{-# language OverloadedStrings #-} | |
{-# language TypeFamilies #-} | |
{-# language LambdaCase #-} | |
import Control.Applicative (some) | |
import Control.Monad (guard, void) |
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
{-# language LambdaCase #-} | |
{-# language TypeSynonymInstances #-} | |
{-# language FlexibleInstances #-} | |
{-# language FlexibleContexts #-} | |
{-# language DeriveFunctor #-} | |
{-# language OverloadedStrings #-} | |
import Control.Applicative (some) | |
import Control.Monad |
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
// Object.prototype.ancestors = function () { | |
// let acc = [] | |
// for (let i = this; i; i = Object.getPrototypeOf(i)) { | |
// acc.push(i) | |
// } | |
// return acc | |
// } | |
let automatch = function (proto) { |
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
/* | |
Graph Reduction Machine, or GRiM. | |
Makes it possible to implement lazy language above golang in a dumb an simple (but messy) way. | |
The idea is a follows: | |
Lazy program is like a makefile - its a tree (DAG) of dependent computations. | |
You can freely replace each function call with its body, provided you put the arguments in places. |