On Wed, Jun 01, 2022 at 09:27:28PM +0200, Ralf Hemmecke wrote:
> On 01.06.22 21:09, Waldek Hebisch wrote:
> >Did you ever think why 'delay' with pile works?  'delay' expects function
> >as an argument, pile as argument produces a value. Why this
> >works when produced value is _not_ a function?
> 
> Oh, good that you come to it. Exactly, I would always have expected
> something like
> 
> foo(...) == delay
>   () + ->
>      PILE
> 
> There must be some magic in the compiler to silently insert that missing
> piece. Is there?

Yes.  When request type is function type compiler calls
compWithMappingMode which is doing needed magic.  In fact,
compWithMappingMode can handle old form of anonymous functions
with '#1', '#2', etc., but those are rejected by the parser.

However, zero argument case still works and is used with 'delay'.

I supect that the same magic that works with 'delay' breaks
'pretend' in 'lazyEval'...

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20220601200732.GB15652%40fricas.math.uni.wroc.pl.

Reply via email to