[ANN] etrans

Serge Aleynikov serge@REDACTED
Fri Aug 13 15:49:34 CEST 2021


Thank you! I fixed the typos in the README.  The iif unit tests seem to run
without errors in the github workflow.  Could you create an issue if you
see one?

https://github.com/saleyn/etran

On Fri, Aug 13, 2021 at 4:19 AM Ulf Wiger <ulf@REDACTED> wrote:

> Is it just me, or is there something wrong with the pipeline example in
> the README?
>
> https://github.com/saleyn/etran#erlang-pipeline-erlpipe
>
> `Arg3` seems to be unbound. There is also a '.' ending the `fun6` line.
>
> Also, eunit seems to fail on an 'iif' transform.
>
> Other than that ... ;-)
>
> BR,
> Ulf
>
> On Fri, Aug 13, 2021 at 1:32 AM Serge Aleynikov <serge@REDACTED>
> wrote:
>
>> I'd like to announce the release of etrans - the set of parse transforms
>> that bring some convenient syntax features that improve code readability:
>>
>> https://github.com/saleyn/etran
>>
>> etrans implements an Elixir-like pipeline using the following syntax:
>>
>> print(A) ->
>>   [A] / element(1, A)
>>       / io:format("~s\n", [_]).
>>
>> test(Arg1, Arg2) ->
>>   [Arg1, Arg2]
>>   / fun1
>>   / mod:fun2
>>   / fun3()
>>   / fun4(Arg3, _)
>>   / io_lib:format("~p\n", [_])
>>   / fun6([1,2,3], _, other_param)
>>   / fun7.
>>
>> Additionally, it implements ternary "if" (i.e. iif(Cond, True, False)),
>> and stringification transforms, including "throw(Format, Args)".
>>
>> Enjoy!
>>
>> Serge
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210813/e7ef7b61/attachment.htm>


More information about the erlang-questions mailing list