We don't bite newbies here... much PerlMonks

### Re^4: Determine steps between two numbers

by CountZero (Bishop)
 on Sep 05, 2012 at 18:48 UTC ( #991915=note: print w/replies, xml ) Need Help??

in reply to Re^3: Determine steps between two numbers
in thread Determine steps between two numbers

Not too confident in the one-line generator you have there, but it'd be a nice touch anyway.
Why? Don't you trust mathematics?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics
• Comment on Re^4: Determine steps between two numbers

Replies are listed 'Best First'.
Re^5: Determine steps between two numbers
by thmsdrew (Scribe) on Sep 05, 2012 at 19:31 UTC

I trust the math of it. It's not that I'm not confident that grizzley's solution is mathematically sound. Rather, I'm not confident in my own ability to fully understand that use of map, especially if I were to stop thinking about this and come back to it later. I also don't really see the need.

Come back here regularly, participate in helping others and soon map and other useful Perl-constructs will have no secrets for you anymore. Your knowledge and productivity will soar.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

We shall see. Thanks!

Create A New User
Node Status?
node history
Node Type: note [id://991915]
help
Chatterbox?
 [marto]: good morning all [karlgoethebier]: good morning

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-06-29 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
How many monitors do you use while coding?

Results (655 votes). Check out past polls.