You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Replete together with "Clojure for the Brave and True" in order to learn Clojure on my iPad Air 2. All has gone well until I got to the point of trying to implement multiple-arity functions. The following example from here is where I am having some issues:
(defn x-chop
"Describe the kind of chop you're inflicting on someone"
([name chop-type]
(str "I " chop-type " chop " name "! Take that!"))
([name]
(x-chop name "karate")))
When I paste this example into Replete, I get the following instead:
(defn x-chop
"Describe the kind of chop you're inflicting on someone"
([name chop-type
(str "I " chop-type " chop " name "! Take that!")])
([name
(x-chop name "karate")]))
Once pasted, I find that I am completely unable to fix the position of both of the braces. I can fix one of the trailing braces, but if I fix the second one, the other one reverts to the incorrect position.
This problem does not occur if I simply type in the function definition directly. I suspect the difference has to do with how I move to the right of the square brace at the appropriate time. But the real issue seems to be the inability to fix the square brace position once it has been pasted into the entry field.
The text was updated successfully, but these errors were encountered:
I can reproduce the problem. It appears to be caused by the lines after the binding forms being over far enough to the right, and you can work around the problem by, after pasting, placing your cursor before, say (str and tapping delete twice.
But, perhaps there is something Replete can do in this case. (Evidently Cursive handles it when in Parinfer mode).
I noticed similar issues copy-pasting forms in---maybe the easiest solution is to include an option to turn off paredit/parinfer (not sure which is baked in) mode for a given input prompt?
I've been using Replete together with "Clojure for the Brave and True" in order to learn Clojure on my iPad Air 2. All has gone well until I got to the point of trying to implement multiple-arity functions. The following example from here is where I am having some issues:
When I paste this example into Replete, I get the following instead:
Once pasted, I find that I am completely unable to fix the position of both of the braces. I can fix one of the trailing braces, but if I fix the second one, the other one reverts to the incorrect position.
This problem does not occur if I simply type in the function definition directly. I suspect the difference has to do with how I move to the right of the square brace at the appropriate time. But the real issue seems to be the inability to fix the square brace position once it has been pasted into the entry field.
The text was updated successfully, but these errors were encountered: