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(parse_ini). | |
-compile(export_all). | |
% Parser fun :: s() -> {'ok', {a(), s()}} | {'error', reason()} | |
return(A) -> fun (S) -> {ok, {A, S}} end. | |
what(Msg, P) -> | |
fun (S) -> |
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(parse_ini). | |
-compile(export_all). | |
% Parser fun :: s() -> {'ok', {a(), s()}} | {'error', reason()} | |
return(A) -> fun (S) -> {ok, {A, S}} end. | |
what(Msg, P) -> | |
fun (S) -> |
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(parser). | |
-compile(export_all). | |
%%%%%%%%%%%%%%%% | |
%%%% Config %%%% | |
%%%%%%%%%%%%%%%% | |
%% Basic configuration utility. | |
%% |
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 Structurable | |
def self.included base | |
base.class_eval do | |
def initialize hash | |
hash.each do |k, v| | |
temp = v | |
eval "@#{k} = temp" | |
self.instance_eval do |
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(evaluate). | |
-compile(export_all). | |
test_program() -> | |
[[l, l, l, [var, 2], [var, 0], [var, 1]], | |
1, | |
2, | |
[l, l, [var, 1]]]. |
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(lang0). | |
-compile(export_all). | |
expression() -> | |
parser:any([ | |
lambda(), | |
application() | |
]). |
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
class User | |
+ For anyone | |
def create_project :from => params | |
project = Project.new :from => params | |
become_owner! :of => project | |
end | |
+ For project.owner |
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 Mine where | |
import Data.Ratio | |
import Control.Monad (join) | |
import Data.List | |
import qualified Data.Map as Map | |
import Data.Map (Map) | |
second = one "second" |
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 | |
rest name nested = resource name -- /users/... | |
* (root -- /users/ | |
+ identifier -- /users/5/... | |
* (root -- /users/5/ | |
+ end "show" -- /users/5/show | |
+ end "edit" -- /users/5/edit | |
+ nested)) -- /users/5/key/5/<...> |
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 Instances where | |
import Control.Monad | |
import Types | |
-- For debugging | |
instance Show Response where | |
show result = show (code result) ++ ": " | |
++ response result |
OlderNewer