Skip to content

Instantly share code, notes, and snippets.

class Bottles
def initialize
@verses = {
2 => LastButOneVerse::new,
1 => LastVerse::new,
0 => EpilogueVerse::new
}
3.upto(99) do |index|
(def first-name
{"a" "Ally-Pally"
"b" "Bongo"
"c" "Chippers"
"d" "Dingo"
"m" "Muffy"})
(def second-name
{"a" "Anstruther"
"b" "Beaufort"
%% 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]).
%% 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]).