aboutsummaryrefslogtreecommitdiff
path: root/challenge-327/deadmarshal/erlang/ch1.erl
blob: 9329e5cec9da2c4bdcf15ed5e6f2dace72757257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-module(ch1).
-export([missing_integers/1]).

-spec missing_integers(L) -> R when
    L :: [T],
    R :: sofs:external_set(),
    T :: term().
missing_integers(L) ->
  S1 = sofs:set(L),
  S2 = sofs:set(lists:seq(1,length(L))),
  sofs:to_external(sofs:symdiff(S1,S2)).