born Posted March 6 Share Posted March 6 Is there a shorter way to write this in OM? (loop for i from 1 to 9 collect (* 100 i)) Quote Link to comment Share on other sites More sharing options...
erka Posted March 6 Share Posted March 6 This gives the same result: (gen-integer 100 900 100) but just for your collect function. Check the function description Quote Link to comment Share on other sites More sharing options...
AM Posted March 6 Share Posted March 6 (loop for i from 100 to 900 by 100 collect i) Quote Link to comment Share on other sites More sharing options...
born Posted March 7 Author Share Posted March 7 And what about (loop for i in '(4 3 6 1 2 5) collect (* i 100)) ? Quote Link to comment Share on other sites More sharing options...
erka Posted March 7 Share Posted March 7 (scale-numbers 100 '(4 3 6 1 2 5)) Quote Link to comment Share on other sites More sharing options...
opmo Posted March 7 Share Posted March 7 (a*x 100 '(1 2 3 4 5 6 7 8 9)) Quote Link to comment Share on other sites More sharing options...
born Posted March 9 Author Share Posted March 9 On 3/7/2023 at 4:54 PM, opmo said: (a*x 100 '(1 2 3 4 5 6 7 8 9)) A nice one! There is no documentation in OM about this, only the function description (ctrl-y) Quote Link to comment Share on other sites More sharing options...
erka Posted March 9 Share Posted March 9 You find it under Mathematics. There are a lot of useful functions. For some reason they are listed under a-m-x, a-d-x, but in the document you see a*x. Quote Link to comment Share on other sites More sharing options...
opmo Posted March 9 Share Posted March 9 We can’t use * or / characters in the file names, sadly. erka 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.