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
defmodule EWMath.Guidance do | |
@moduledoc """ | |
This is the general guidance document for the module EwMath | |
""" | |
defmodule :'Getting started' do | |
@moduledoc """ | |
This is a guidance that will walk you through blahaba | |
""" | |
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
defmodule Listen.NewFSM do | |
use OtpDsl.Genfsm, register: {:local, :listen_fsm}, | |
initial_state: :start, | |
init_params: [] | |
@timeout 3*1000 | |
defrecord CallInfo, from: "", to: "", suspicious_segments: 0 |
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
defmodule Meetup do | |
defmacrop dayname_parts, do: %W(mon tues wednes thurs fri satur sun) | |
defmacrop dayname(range_id, dayname_part) do | |
if (range_id == :teenth) do | |
dayname_part <> "teenth" | |
else | |
bin = atom_to_binary(range_id) | |
bin <> "_" <> dayname_part <> "day" |
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(cargo_tests). | |
-include_lib("eunit/include/eunit.hrl"). | |
-compile([export_all]). | |
cargo_construction_test() -> | |
Cargo = start_a_cargo(), | |
?assertEqual(not_routed, cargo_delivery:routing_status(Cargo)), | |
?assertEqual(not_received, cargo_delivery:transport_status(Cargo)), |
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
Cargo = start_a_cargo(), | |
Cargo_1 = cargo:specify_new_route(Cargo_1, a_route_specification()), | |
Cargo_99 = cargo:assign_to_route(Cargo_2, an_itenerary_that_does_not_match_the_route_specification()) | |
?assertEqual(misrouted, cargo_delivery:routing_status(Cargo_99)), | |
stop_a_cargo(Cargo_99). |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using AggregateSource; | |
namespace TheStuff | |
{ | |
class Program | |
{ | |
static void Main() |
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
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace Propern.Specs | |
{ | |
[TestClass] | |
public class Math_operations | |
{ | |
static Func<int> an_integer = Spec.Given(R => R.Next()); |
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
Did you get the msg? |
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
defmodule Lab05 do | |
@doc """ | |
My take on [the histogram exercise] | |
(http://computing.southern.edu/halterman/Courses/Fall2013/124/Labs/lab05_F13.html) | |
mentioned in [this newsgroup post] | |
(https://groups.google.com/d/msg/elixir-lang-talk/TTSjV0iy9yA/hpiGDZOk6DkJ) | |
""" | |
def main(), do: parse_pars(System.argv, nil) | |
defp parse_pars([],nil), do: histogram() |
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
%% @doc Register a new identity. | |
-spec register_identity(identifier()) -> succeeded(). | |
%% @end | |
register_identity(Id) -> | |
F = fun () -> | |
Identity = get_identity(Id), | |
{_, true} = {already_registered, Identity =/= not_found}, | |
identity_registered(Id) | |
end, | |
transact(F). |