omdl  v0.6.1
OpenSCAD Mechanical Design Library
datatypes_operate_iterable.scad File Reference

Iterable data type operations. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

function edefined_or (v, i, d)
 Return an iterable element when it exists or a default value when it does not. More...
 
function find (mv, v, c=1, i, i1=0, i2)
 Find the occurrences of a match value in an iterable value. More...
 
function count (mv, v, s=true, i)
 Count all occurrences of a match value in an iterable value. More...
 
function exists (mv, v, s=true, i)
 Check for the existence of a match value in an iterable value. More...
 
function first (v)
 Return the first element of an iterable value. More...
 
function second (v)
 Return the second element of an iterable value. More...
 
function third (v)
 Return the third element of an iterable value. More...
 
function last (v)
 Return the last element of an iterable value. More...
 
function nfirst (v, n=1)
 Return a list containing the first n elements of an iterable value. More...
 
function nlast (v, n=1)
 Return a list containing the last n elements of an iterable value. More...
 
function nhead (v, n=1)
 Return a list containing all but the last n elements of an iterable value. More...
 
function ntail (v, n=1)
 Return a list containing all but the first n elements of an iterable value. More...
 
function reverse (v)
 Reverse the elements of an iterable value. More...
 
function rselect (v, i)
 Select a range of elements from an iterable value. More...
 
function nssequence (v, n=1, s=1, w=false)
 Return a list of all n-element sequential-subsets of an iterable value. More...
 
function eappend (nv, v, r=true, j=true, l=true)
 Append a value to each element of an iterable value. More...
 
function insert (nv, v, i=0, mv, mi=0, s=true, si)
 Insert a new value into an iterable value. More...
 
function delete (v, i, mv, mc=1, s=true, si)
 Delete elements from an iterable value. More...
 
function strip (v, mv=empty_lst)
 Strip all matching values from an iterable value. More...
 
function unique (v)
 Return the unique elements of an iterable value. More...
 

Detailed Description

Iterable data type operations.

Author
Roy Allen Sutton
Date
2015-2017

This file is part of omdl, an OpenSCAD mechanical design library.

The omdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

The omdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the omdl; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA; or see http://www.gnu.org/licenses/.

Definition in file datatypes_operate_iterable.scad.