<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/command.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/main/command.go b/main/command.go
index 9554f9d..136fb26 100644
--- a/main/command.go
+++ b/main/command.go
@@ -54,19 +54,12 @@ func (cmd DeletePathCommand) exec(state *ProgramState) {
}
func runSubex(state subex.SubexState, in []walk.WalkValue) (out []walk.WalkValue, error bool) {
- valueStream := make(chan walk.WalkValue)
- go func(in []walk.WalkValue, out chan<- walk.WalkValue) {
- for _, value := range in {
- out <- value
- }
- close(out)
- }(in, valueStream)
- atomStream := walk.Atomise(valueStream)
- atomsOut, error := subex.RunTransducer(state, atomStream)
+ atomsIn := walk.Atomise(in)
+ atomsOut, error := subex.RunTransducer(state, atomsIn)
if error {
return nil, true
}
- valuesOut, err := walk.MemoryCompound(atomsOut)
+ valuesOut, err := walk.Compound(atomsOut)
if err != nil {
return nil, true
}