Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Allow manipulating strings directly? #9

Open
lgarron opened this issue Jul 12, 2018 · 1 comment
Open

Allow manipulating strings directly? #9

lgarron opened this issue Jul 12, 2018 · 1 comment

Comments

@lgarron
Copy link
Member

lgarron commented Jul 12, 2018

This is less performant, but super convenient:

> expand("(R U)2")
"R U R U"

Can easily be done by separating the Traversal[Down]Up.traverse() entry point from a recursive entry point, and translating the input from/to a string if it was given as a string.

The main problem I see is that the performance issue might be masked, and users might perform a lot of conversions back and forth:

structureEquals(invert(expand("(R U)2")), expand(invert("(R U)2")))
@lgarron
Copy link
Member Author

lgarron commented Jul 12, 2018

Other options:

Include separate versions of the functions for strings:

expandString("(R U)2")

Create a wrapper function that converts to/from strings:

forStrings(expand)("(R U)2")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant