Packages

A library for working with lazy lists in Gleam

Current section

Files

Jump to
gleam_zlists src gleam_zlists@interface.erl
Raw

src/gleam_zlists@interface.erl

-module(gleam_zlists@interface).
-compile(no_auto_import).
-export([new_1/2, new_2/2, generate/2, recurrent_2/2, recurrent_3/3, foreach/2, foldl/3, map/2, seq/3, dropwhile/2, drop/2, takewhile/2, take/2, filter/2, expand/1, append/1, scroll/2, merge/2, splitwith/2, cartesian/2, zip/2, ziph/2, unique_1/1, unique_2/2, count/1, print/1]).
-spec new_1(list(EKP), fun(() -> list(EKP))) -> gleam_zlists@interop:z_list(EKP).
new_1(Ls, F) ->
gleam_zlists@interop:new_1(Ls, F).
-spec new_2(
gleam_zlists@interop:z_list(EKT),
fun(() -> gleam_zlists@interop:z_list(EKT))
) -> gleam_zlists@interop:z_list(EKT).
new_2(Ls, F) ->
gleam_zlists@interop:new_2(Ls, F).
-spec generate(
gleam_zlists@interop:z_list(EKX),
fun((EKX) -> gleam_zlists@interop:z_list(EKZ))
) -> gleam_zlists@interop:z_list(EKZ).
generate(Zl, F) ->
gleam_zlists@interop:generate(Zl, F).
-spec recurrent_2(ELC, fun((ELC) -> ELC)) -> gleam_zlists@interop:z_list(ELC).
recurrent_2(Elem, F) ->
gleam_zlists@interop:recurrent_2(Elem, F).
-spec recurrent_3(ELE, ELF, fun((ELE, ELF) -> {ELE, ELF})) -> gleam_zlists@interop:z_list(ELE).
recurrent_3(Elem, Elem_1, F) ->
gleam_zlists@interop:recurrent_3(Elem, Elem_1, F).
-spec foreach(fun((ELH) -> any()), gleam_zlists@interop:z_list(ELH)) -> nil.
foreach(F, Zl) ->
gleam_zlists@interop:foreach(F, Zl).
-spec foldl(fun((ELK, ELL) -> ELL), ELL, gleam_zlists@interop:z_list(ELK)) -> ELL.
foldl(F, Accum, Zl) ->
gleam_zlists@interop:foldl(F, Accum, Zl).
-spec map(fun((ELN) -> ELO), gleam_zlists@interop:z_list(ELN)) -> gleam_zlists@interop:z_list(ELO).
map(F, Zl) ->
gleam_zlists@interop:map(F, Zl).
-spec seq(integer(), integer(), integer()) -> gleam_zlists@interop:z_list(integer()).
seq(From, To, Incr) ->
gleam_zlists@interop:seq(From, To, Incr).
-spec dropwhile(fun((ELS) -> boolean()), gleam_zlists@interop:z_list(ELS)) -> gleam_zlists@interop:z_list(ELS).
dropwhile(Pred, Zl) ->
gleam_zlists@interop:dropwhile(Pred, Zl).
-spec drop(integer(), gleam_zlists@interop:z_list(ELV)) -> gleam_zlists@interop:z_list(ELV).
drop(N, Zl) ->
gleam_zlists@interop:drop(N, Zl).
-spec takewhile(fun((ELY) -> boolean()), gleam_zlists@interop:z_list(ELY)) -> gleam_zlists@interop:z_list(ELY).
takewhile(Pred, Zl) ->
gleam_zlists@interop:takewhile(Pred, Zl).
-spec take(integer(), gleam_zlists@interop:z_list(EMB)) -> gleam_zlists@interop:z_list(EMB).
take(N, Zl) ->
gleam_zlists@interop:take(N, Zl).
-spec filter(fun((EME) -> boolean()), gleam_zlists@interop:z_list(EME)) -> gleam_zlists@interop:z_list(EME).
filter(Pred, Zl) ->
gleam_zlists@interop:filter(Pred, Zl).
-spec expand(gleam_zlists@interop:z_list(EMH)) -> list(EMH).
expand(Zl) ->
gleam_zlists@interop:expand(Zl).
-spec append(gleam_zlists@interop:z_list(gleam_zlists@interop:z_list(EMK))) -> gleam_zlists@interop:z_list(EMK).
append(Zlsts) ->
gleam_zlists@interop:append(Zlsts).
-spec scroll(integer(), gleam_zlists@interop:z_list(EMO)) -> {list(EMO),
gleam_zlists@interop:z_list(EMO)}.
scroll(N, Zl) ->
gleam_zlists@interop:scroll(N, Zl).
-spec merge(gleam_zlists@interop:z_list(EMS), gleam_zlists@interop:z_list(EMS)) -> gleam_zlists@interop:z_list(EMS).
merge(Zl_1, Zl_2) ->
gleam_zlists@interop:merge(Zl_1, Zl_2).
-spec splitwith(fun((EMW) -> boolean()), gleam_zlists@interop:z_list(EMW)) -> {list(EMW),
gleam_zlists@interop:z_list(EMW)}.
splitwith(Pred, Zl) ->
gleam_zlists@interop:splitwith(Pred, Zl).
-spec cartesian(
gleam_zlists@interop:z_list(ENA),
gleam_zlists@interop:z_list(ENA)
) -> gleam_zlists@interop:z_list(ENA).
cartesian(Zl_1, Zl_2) ->
gleam_zlists@interop:cartesian(Zl_1, Zl_2).
-spec zip(gleam_zlists@interop:z_list(ENE), gleam_zlists@interop:z_list(ENG)) -> gleam_zlists@interop:z_list({ENE,
ENG}).
zip(Zl_1, Zl_2) ->
gleam_zlists@interop:zip(Zl_1, Zl_2).
-spec ziph(gleam_zlists@interop:z_list(ENJ), gleam_zlists@interop:z_list(ENL)) -> gleam_zlists@interop:z_list({ENJ,
ENL}).
ziph(Zl_1, Zl_2) ->
gleam_zlists@interop:ziph(Zl_1, Zl_2).
-spec unique_1(gleam_zlists@interop:z_list(ENO)) -> gleam_zlists@interop:z_list(ENO).
unique_1(Zl) ->
gleam_zlists@interop:unique_1(Zl).
-spec unique_2(fun((ENR, ENR) -> boolean()), gleam_zlists@interop:z_list(ENR)) -> gleam_zlists@interop:z_list(ENR).
unique_2(Pred, Zl) ->
gleam_zlists@interop:unique_2(Pred, Zl).
-spec count(gleam_zlists@interop:z_list(any())) -> integer().
count(Zl) ->
gleam_zlists@interop:count(Zl).
-spec print(gleam_zlists@interop:z_list(any())) -> nil.
print(Zl) ->
gleam_zlists@interop:print(Zl).