Add cell paths for streams

This commit is contained in:
JT
2021-09-07 19:35:59 +12:00
parent 71bbd70a57
commit a8646f94ab
5 changed files with 29 additions and 12 deletions

View File

@ -30,7 +30,7 @@ impl Command for Each {
let context = context.clone();
match input {
Value::Range { val, .. } => Ok(Value::ValueStream {
Value::Range { val, .. } => Ok(Value::Stream {
stream: val
.into_iter()
.map(move |x| {
@ -52,7 +52,7 @@ impl Command for Each {
.into_value_stream(),
span: call.head,
}),
Value::List { vals: val, .. } => Ok(Value::ValueStream {
Value::List { vals: val, .. } => Ok(Value::Stream {
stream: val
.into_iter()
.map(move |x| {
@ -74,7 +74,7 @@ impl Command for Each {
.into_value_stream(),
span: call.head,
}),
Value::ValueStream { stream, .. } => Ok(Value::ValueStream {
Value::Stream { stream, .. } => Ok(Value::Stream {
stream: stream
.map(move |x| {
let engine_state = context.engine_state.borrow();

View File

@ -53,7 +53,7 @@ impl Command for For {
let context = context.clone();
match values {
Value::ValueStream { stream, .. } => Ok(Value::ValueStream {
Value::Stream { stream, .. } => Ok(Value::Stream {
stream: stream
.map(move |x| {
let engine_state = context.engine_state.borrow();

View File

@ -32,7 +32,7 @@ impl Command for Length {
span: call.head,
})
}
Value::ValueStream { stream, .. } => {
Value::Stream { stream, .. } => {
let length = stream.count();
Ok(Value::Int {