Skip to content

Commit

Permalink
Remove redundant 'concat' implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
dfellis committed Jul 12, 2024
1 parent 23a436c commit f2a670f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/std/root.ln
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ export fn has{T}(a: Array{T}, v: T) -> bool binds hasarray;
export fn has{T}(a: Array{T}, f: (T) -> bool) -> bool binds hasfnarray;
export fn find{T}(a: Array{T}, f: (T) -> bool) -> Maybe{T} binds findarray;
export fn every{T}(a: Array{T}, f: (T) -> bool) -> bool binds everyarray;
export fn concat{T}(a: Array{T}, b: Array{T}) -> Array{T} binds concatarray;

/// Buffer related bindings
export fn len{T, S}(T[S]) -> i64 = {S}();
Expand Down
13 changes: 0 additions & 13 deletions src/std/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1819,19 +1819,6 @@ fn everyarray<T>(a: &Vec<T>, f: fn(&T) -> bool) -> bool {
return true;
}

/// `concatarray` returns a new vector composed of the elements of the input vectors
#[inline(always)]
fn concatarray<T: std::clone::Clone>(a: &Vec<T>, b: &Vec<T>) -> Vec<T> {
let mut out = Vec::new();
for v in a {
out.push(v.clone());
}
for v in b {
out.push(v.clone());
}
out
}

/// `mapbuffer_onearg` runs the provided single-argument function on each element of the buffer,
/// returning a new buffer
#[inline(always)]
Expand Down

0 comments on commit f2a670f

Please sign in to comment.