boba22 Posted December 10, 2013 Share Posted December 10, 2013 Can someone write me the program for this: insert' 111 2 1 [[2..4],[3..5],[7..9]] = [[2, 3, 4],[3, 4, 111],[7, 8, 9]] And a program for rotating the list for i places. Positive i rotates left for i places and negative rotates right for i places. Don't use Data.Bits And also this: And also a function that is inserting an element on a i position in list , counting from 0, so that it replaces the existing element in the position i. If i is negative then the counting starts from the end of the list. The result must look like this: insert2' "fine" 2 ["I","am","great"] = ["I","am","fine"] insert2i 3 (-7) [1..4] = [1,3,3,4] Link to comment Share on other sites More sharing options...
Developers Jos Posted December 10, 2013 Developers Share Posted December 10, 2013 Welcome.. Can someone write me the program for As this is a support forum, Your sentence is starting with the wrong words. The intent is you code the script yourself and ask for help. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
boba22 Posted December 10, 2013 Author Share Posted December 10, 2013 (edited) i tried to do the codes a hunderd times but they dont work: for the third one i have this: insert2' :: a -> Int -> [a] -> [a] insert2' x n [] = [] insert2' x n xs = f ++ [x] ++ drop (length xs - n) xs where f = (take (length xs - n) xs) and for the first one i have this: insert' xs ys = [[x y | x <- xs] | y <- ys] Edited December 10, 2013 by boba22 Link to comment Share on other sites More sharing options...
Developers Jos Posted December 11, 2013 Developers Share Posted December 11, 2013 Maybe it would be a good idea for you to start looking at the helpfile and get yourself familiarized with the AutoIt3 syntax, since what you posted doesn't make much sense. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted December 11, 2013 Share Posted December 11, 2013 Maybe it would be a good idea for you to start looking at the helpfile and get yourself familiarized with the AutoIt3 syntax, since what you posted doesn't make much sense. Because he's after Haskell. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted December 11, 2013 Developers Share Posted December 11, 2013 Because he's after Haskell.understood and can only assume the OP wants to convert it to AutoIt3 syntax since he posted here. So a good start would be to understand the basics before asking questions. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now