How to take user input and reverse it using unshift and join array?

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 4976 Views - Last Post: 16 March 2019 - 03:20 PM Rate Topic: -----

#16 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2754
  • View blog
  • Posts: 4,414
  • Joined: 21-June 11

Re: How to take user input and reverse it using unshift and join array?

Posted 15 March 2019 - 02:55 AM

View Postandrewsw, on 15 March 2019 - 10:06 AM, said:

Is join a monad? Please respond within 24 words.


join is a method. A monad consists of a type and two or three (depending on the definition) operations on that type. So no.
Was This Post Helpful? 0
  • +
  • -

#17 BobRodes   User is offline

  • Product Manager
  • member icon

Reputation: 603
  • View blog
  • Posts: 3,085
  • Joined: 19-May 09

Re: How to take user input and reverse it using unshift and join array?

Posted 16 March 2019 - 03:20 PM

View Postandrewsw, on 15 March 2019 - 04:06 AM, said:

@Bob thank you. I see what you did there.


Very good. I put it up there to illustrate Ruby's multiple assignment capability, which is very cool when you're trying to transpose a couple of variables.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2