[erlang-questions] [ANN] SeqBind, Sequential Binding Parse Transformation for Erlang (Experimental)

Yurii Rashkovskii yrashk@REDACTED
Mon Jan 16 19:03:45 CET 2012


Jon,

This is a good & valid concern. WIth this use case in mind, I just
added seqbind:i/3 (M,F,A) helper that can be used to print out
function-in-question's source code interactively with all sequential
bindings renamed so that they can be easily matched to those you can
use in the debugger.

On Mon, Jan 16, 2012 at 9:33 AM, Jon Watte <jwatte@REDACTED> wrote:
> When I write code like that (instead of just inlining all the arguments like
> a good functional programmer), I do that because I want to be able to
> inspect L1 and L2 in the debugger.
>
> Sincerely,
>
> jw
>
>
> --
> Americans might object: there is no way we would sacrifice our living
> standards for the benefit of people in the rest of the world. Nevertheless,
> whether we get there willingly or not, we shall soon have lower consumption
> rates, because our present rates are unsustainable.
>
>
>
> On Sat, Jan 14, 2012 at 11:54 AM, Yurii Rashkovskii <yrashk@REDACTED>
> wrote:
>>
>> Hi,
>>
>> Problem
>> -------
>>
>> Does it bother you that some of your code looks like this?
>>
>> ```erlang
>>  L1 = lists:map(fun (X) -> ... end, L),
>>  L2 = lists:filter(fun (X) -> ... end, L1)
>>  %% or
>>  {Q,Req1} = cowboy_http_req:qs_val(<<"q">>,Req),
>>  {Id,Req2} = cowboy_http_req:qs_val(<<"id">>,Req1)
>> ```
>>
>> Solution
>> ------------
>>
>> You can find out about it at https://github.com/spawngrid/seqbind
>>
>> Thanks,
>> Yurii.
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
>



More information about the erlang-questions mailing list