[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tail call elimination
From: |
Pete Dietl |
Subject: |
Re: Tail call elimination |
Date: |
Thu, 21 May 2020 12:39:11 -0500 |
> 5 + (2 * 9 / (7 + 5 + 4)) * (1024 * 1024) / 19
>
> becomes:
>
> $(math +, 5 $(math /, $(math *, $(math /, $(math *, 2 9) $(math +, 7 5 4))
> $(math *, 1024 1024)) 19))
>
> versus:
>
> $(op + 5 $(op / $(op * $(op / $(op * 2 9) $(op + 7 5 4)) $(op * 1024 1024))
> 19))
>
> or:
>
> $(+ 5 $(/ $(* $(/ $(* 2 9) $(+ 7 5 4)) $(* 1024 1024)) 19))
I propose the following (a variation of example 2):
$(math + 5 (/ (* (/ (* 2 9) (+ 7 5 4)) (* 1024 1024)) 19))
This would involve doing our own parsing of the argument,
however this should be trivial since we are using prefix notation.
same with cond.
- Re: Tail call elimination, (continued)
- Re: Tail call elimination, Pete Dietl, 2020/05/20
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Tim Murphy, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Kevin R. Bulgrien, 2020/05/21
- Re: Tail call elimination, Paul Smith, 2020/05/21
- Re: Tail call elimination,
Pete Dietl <=
- Re: Tail call elimination, Pete Dietl, 2020/05/22
- Re: Tail call elimination, Tim Murphy, 2020/05/22
- Re: Tail call elimination, Pete Dietl, 2020/05/23
- math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/23
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/23
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/24
- Re: math expressions (was: Re: Tail call elimination), Pete Dietl, 2020/05/24
- Re: math expressions (was: Re: Tail call elimination), Paul Smith, 2020/05/24
- Re: Tail call elimination, Edward Welbourne, 2020/05/25
- Re: Tail call elimination, Tim Murphy, 2020/05/20