Skip to content

Instantly share code, notes, and snippets.


Abhishek C Sharma portgasd666

  • India
View GitHub Profile
View supervised_frequency.erl
-export([start/0, stop/0, allocate/0, deallocate/1, client/1]).
-export([init_supervisor/0, init_server/0]).
%% Server interface
% Start the supervisor and the frequency server
start() ->
register(frequency_supervisor, spawn(frequency, init_supervisor, [])).
portgasd666 / frequency.erl
Created Apr 9, 2017
Frequency server that handles timeout and calls clear appropriately
View frequency.erl
%% Based on code from
%% Erlang Programming
%% Francecso Cesarini and Simon Thompson
%% O'Reilly, 2008
%% (c) Francesco Cesarini and Simon Thompson
portgasd666 / index.erl
Created Mar 5, 2017
Functional Programming in Erlang MOOC: Programming Challenge - Indexing a File
View index.erl
-export([make_index/1, show_file_contents/1]).
% Used to read a file into a list of lines.
% Example files available in:
% gettysburg-address.txt (short)
% dickens-christmas.txt (long)
make_index(Name) ->
You can’t perform that action at this time.