2017-07-06から1日間の記事一覧
pqueue2 | Hexを作った。 github.com Erlang で書かれたpqueueに含まれてる pqueue2 モジュールを、Elixir でラップしたもの。 q = PQueue2.new |> PQueue2.put(:a, 2) |> PQueue2.put(:b, 1) |> PQueue2.put(:c, 1) {:b, q} = PQueue2.pop Collectable と E…
Stream で hash を計算する stream_hash | Hex 何故無かった。 github.com "test/fixture/xyzxyz.txt" |> File.stream! |> StreamHash.hash(:sha512) |> Enum.to_list |> hd # <<215, 133, 241, 243, 115, 159, 59, 127, 111, 242, 140, 106, 171, 211, 130,…