Zip and Substitute?

HopfenUndMalz shared this problem 4 years ago
New

When I process result lists e.g. sol:={x=1, x=2, x=3, ...} Zip would be very compact but does not seem to work:


Zip(substitute(x,r),r,sol)


gives no ("?") answer.

Comments (3)

photo
1

also not works: Zip[RightSide[r],r,sol]

but for this case as workaround: RightSide[sol] works!!

photo
1

Hi, why do you not use Solutions[$1] ?

photo
2

@rami, @Michel: Thank you - these workarounds are pretty sufficient and make everything work fine!

The given example has been simplified by me, I rather use statements like


Zip((x,f(x)),x,sol)


but these work too using list of solutions instead of a list of replacements. Working with replacement lists is a very old habit of me(from working with Maxima and Mathematica).


The question why this expression seems not to be valid remains (and arises in some other situations when using Zip seems to be a natural formulation)

© 2021 International GeoGebra Institute