On 05/19, Dario Sanfilippo wrote:
>
> Hello, list. I hope that you're all well.
>
> I just started using pattern matching and I'd kindly ask for your help to
> better understand how things work.
>
> The goal is to implement an *ifthenelseif* function that takes cond-then
> pairs as arguments except the last set of arguments that are
> cond-then-else. The function should look like this,
>
> ifthenelseif(C1, T1, C2, T2, Cn, Tn, E);
>
> and unfold into this,
>
> if(C1, T1, if(C2, T2, if(Cn, Tn, E))); .

Not sure I understand what exactly do you want... but you can pass a single
list. Say,

        ifthenelse((c, t, e)) = select2(c, ifthenelse(e), t);
        ifthenelse(e) = e;

        process = ifthenelse((C1,T1, C2,T2, ..., Cn,Tn, E));

Oleg.



_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to