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
class Bottles | |
def initialize | |
@verses = { | |
2 => LastButOneVerse::new, | |
1 => LastVerse::new, | |
0 => EpilogueVerse::new | |
} | |
3.upto(99) do |index| |
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
(def first-name | |
{"a" "Ally-Pally" | |
"b" "Bongo" | |
"c" "Chippers" | |
"d" "Dingo" | |
"m" "Muffy"}) | |
(def second-name | |
{"a" "Anstruther" | |
"b" "Beaufort" |
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
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(frequency2). | |
-export([start/0,allocate/0,deallocate/1,stop/0,clear/0,loadtest/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
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(supervised_frequency). | |
-export([allocate/0, deallocate/1, stop_server/0, start_supervisor/0, terminate/0]). |