search for: curargs

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

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()&q...
2016 Dec 14
2
Openness to a "zip_iterator" type?
One of my coworkers noticed that we(Clang/LLVM) have quite a few places where we need to iterate through 2 equally sized ranges at the same time, often related to parm/arg relationships. In a few cases we(Clang/LLVM) use a traditional for-loop with 2 iterators in it. In a few others, the implementation uses range-for over 1 range with an iterator pattern on the other. IMO, the correct solution
2016 Dec 14
0
Openness to a "zip_iterator" type?
> On Dec 14, 2016, at 9:37 AM, Keane, Erich via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > One of my coworkers noticed that we(Clang/LLVM) have quite a few places where we need to iterate through 2 equally sized ranges at the same time, often related to parm/arg relationships. In a few cases we(Clang/LLVM) use a traditional for-loop with 2 iterators in it. In a few others,
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