Skip to content
Prev 44393 / 398513 Next

In praise of ->

This is not a problem, but I thought that I might say one or two things 
in favour of right pointing assignment before anybody influential gets 
the idea of scrapping it!

Situation (a)

You have just typed a long complcated expression into the console and 
you suddenly realise that you will need it later in the session. Just 
append
-> something
to the end of the expression. You can do this with any recently 
evaluated expression with the help of the up-arrow key (in Windows at 
least).

Situation (b)

You have written a chunk of code and you want to see how it behaves for 
various values of the scalar "fred". Just put
-> fred
at the start of the code block, type any number, then paste the code 
into the console.

Cheers,  Murray