diff --git a/iter.spl b/iter.spl index 498749f..c5fd225 100644 --- a/iter.spl +++ b/iter.spl @@ -38,9 +38,10 @@ construct _Iter { filter this FilterIter:new } skip { this | with amount this ; - { | + { | pop this:next; } amount:foreach + this } count { mega | with this ; def n 0 =n diff --git a/src/main.rs b/src/main.rs index dd794b1..e3f2d1b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,9 @@ -use spl::start_file; +use spl::{start_file, find_in_splpath}; use std::env::args; fn main() { - if let Err(x) = start_file(&args().nth(1).expect("no file provided to be started.")) { + if let Err(x) = start_file(&args().nth(1).unwrap_or_else(|| find_in_splpath("repl.spl").expect("no file to be run"))) { println!("{x:?}"); } }