Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Papers we love: Elixir edition

Papers we love: Elixir edition

Andrea Leopardi

July 16, 2018
Tweet

More Decks by Andrea Leopardi

Other Decks in Programming

Transcript

  1. 1) test two strings are different (Test) test.ex:6 Assertion with

    == failed code: assert "hello world!" == "Hello, my world" left: "hello world!" right: "Hello, my world" stacktrace: test.ex:7: (test)
  2. “Find the shortest edit script to turn a sequence A

    into a sequence B.” = Find shortest path in a graph
  3. O(ND) D is related to how "similar" the two sequences

    are DNA strand mutation source code changes
  4. check all list <- list_of(term()) do sorted = sort(list) assert

    is_list(sorted) assert length(list) == length(sorted) end
  5. data Colour = Red | Blue | Green instance Arbitrary

    Colour where arbitrary = oneof [return Red, return Blue, return Green]
  6. StreamData check all s1 <- string(), s2 <- string() do

    assert String.starts_with?(s1 <> s2, s1) assert String.ends_with?(s1 <> s2, s2) end
  7. map(StreamData.integer(), fn x -> x * 2 end) 3 *

    2 0 * 2 2 * 2 0 * 2 1 * 2 0 * 2
  8. Advances in record linkage methodology as applied to the 1985

    census of Tampa Florida Matthew A. Jaro