(4+3).reverse # => 1?

X

x1

Does anything like this exist?

a method of inversing the given operation..

(4=B2).revese # yields 2, the square of 4
(8/4).reverse # yields 32, the product of 8*4
 
H

Hal Fulton

x1 said:
Does anything like this exist?
=20
a method of inversing the given operation..
=20
(4=B2).revese # yields 2, the square of 4
(8/4).reverse # yields 32, the product of 8*4

No... and what you're asking for doesn't really
make sense, as expressions are evaluated from
the inside out:

(8/4).methcall

would be the same as

2.methcall


Make sense?


Hal
 
D

David A. Black

--8323328-918706930-1128307788=:19080
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-918706930-1128307788=:19080"

This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-918706930-1128307788=:19080
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

Hi --

Does anything like this exist?

a method of inversing the given operation..

(4=B2).revese # yields 2, the square of 4
(8/4).reverse # yields 32, the product of 8*4

I don't think it could, and I know that it shouldn't :) The thing
is, whatever follows the dot is being sent to the object that's
returned by the expression (8/4), and not to the expression itself.
So you're asking to reverse 2.


David

--=20
David A. Black
(e-mail address removed)
--8323328-918706930-1128307788=:19080--
--8323328-918706930-1128307788=:19080--
 
X

x1

Hal.. good point. :)

lol.. Ok.. ("8/2").inverse_cal # =3D> 16

:) //my way of running

I was actually studing some finance crap and ran by a definition for
term x.. in taking notes, I wrote down something like..
x - the date when x blah

then there was a term, non-x which is
non-x the date when x not blah

Me being lazy an a ruby enthusiast wrote down
non-x =3D x.reverse

lol.. then my brain started thing about reversing more than just
strings.. logic.. bah.. I'm a nut. --disregard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top