Post Reply 
Programming puzzles: processing lists!
10-17-2017, 05:00 PM
Post: #206
RE: Programming puzzles: processing lists!
Added the #39 , it is super easy to solve but I'd like to know if there are quick/elegant ways to solve it.

For example I can write

inputlist
@the the current value
DUP
position
GET

@update it and put it back in the list
increment +
position SWAP
PUT


but that is pretty verbose. In the thread of the listExt of DavidM I thought that one could do

{ 1 2 3 4 5 } { 0 0 3 0 0 } ADD
but building the second list is not less verbose than the process written above. At least for my knowledge.

Does someone know a quick way to build a list with only one non zero value in a specified position?

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - pier4r - 10-17-2017 05:00 PM



User(s) browsing this thread: 6 Guest(s)