search for: curarg

Displaying 4 results from an estimated 4 matches for "curarg".

Did you mean: cur_arg
2011 Sep 26
4
Testing for arguments in a function
...100 ## Expected input and behavior: myfun(vec, i) ## Missing an argument, but error is not caught! ## How is subsetting even possible here??? myfun(vec) Is there a way to check for missing function arguments, *and* which function arguments are missing? For example myfun = function(vec, i){ curArgs = current.function.arguments() if(any(sapply(curArgs, missing))){ stop() } ret = vec[i] ret } Obviously "current.function.arguments()" is imaginary, but is there something that would return the current arguments in a way that could be passed to "missing()&...
2016 Dec 14
2
Openness to a "zip_iterator" type?
...pattern on the other. IMO, the correct solution to this would be a templated 'zip' type (similar, though not identical to http://www.boost.org/doc/libs/1_62_0/libs/iterator/doc/zip_iterator.html) that would permit: for (auto&& things : IteratorZip(ParmRange, ArgRange)) { [CurParm, CurArg] = things; // things is a tuple that contains a reference to each value } If I were to implement this IteratorZip type for the LLVM codebase, would this be something the community would be interested in/accept/use? Am I missing an obvious existing implementation somewhere? Thanks, Erich
2016 Dec 14
0
Openness to a "zip_iterator" type?
...; > IMO, the correct solution to this would be a templated 'zip' type (similar, though not identical to http://www.boost.org/doc/libs/1_62_0/libs/iterator/doc/zip_iterator.html) that would permit: > > for (auto&& things : IteratorZip(ParmRange, ArgRange)) { > [CurParm, CurArg] = things; // things is a tuple that contains a reference to each value > } > > > If I were to implement this IteratorZip type for the LLVM codebase, would this be something the community would be interested in/accept/use? Am I missing an obvious existing implementation somewhere? Y...
2006 Oct 23
4
Changing function arguments
R-Developers, I'm looking for some help computing on the R language. I'm hoping to write a function that parses a language or expression object and returns another expression with all instances of certain argument of a given function altered. For instance, say I would like my function, myFun to take an expression and whenever the argument 'x' appears within the function FUN inside