Current section

Files

Jump to
blah src blah@fa@lorem.erl
Raw

src/blah@fa@lorem.erl

-module(blah@fa@lorem).
-compile([no_auto_import, nowarn_unused_vars]).
-export([word/0, words/1, sentence/0, sentences/1, paragraph/0, paragraphs/1]).
-spec word() -> binary().
word() ->
blah@fa@string:pronounceable().
-spec words(integer()) -> binary().
words(Num) ->
_pipe = gleam@list:repeat(<<""/utf8>>, Num),
_pipe@1 = gleam@list:map(_pipe, fun(_) -> word() end),
gleam@string:join(_pipe@1, <<" "/utf8>>).
-spec sentence() -> binary().
sentence() ->
Length = gleam@int:random(4, 16),
_pipe = [words(Length), <<"."/utf8>>],
gleam@string:join(_pipe, <<""/utf8>>).
-spec sentences(integer()) -> binary().
sentences(Num) ->
_pipe = gleam@list:repeat(<<""/utf8>>, Num),
_pipe@1 = gleam@list:map(_pipe, fun(_) -> sentence() end),
gleam@string:join(_pipe@1, <<" "/utf8>>).
-spec paragraph() -> binary().
paragraph() ->
Length = gleam@int:random(4, 8),
_pipe = gleam@list:repeat(<<""/utf8>>, Length),
_pipe@1 = gleam@list:map(_pipe, fun(_) -> sentence() end),
gleam@string:join(_pipe@1, <<" "/utf8>>).
-spec paragraphs(integer()) -> binary().
paragraphs(Num) ->
_pipe = gleam@list:repeat(<<""/utf8>>, Num),
_pipe@1 = gleam@list:map(_pipe, fun(_) -> paragraph() end),
gleam@string:join(_pipe@1, <<"\n"/utf8>>).