src/main/java/com/virgo47/vexpressed/support/FunctionMapper.java
private Object resolveParam(List<FunctionArgument> params, ParameterInfo parameterInfo) {
			for (Iterator<FunctionArgument> iterator = params.iterator(); iterator.hasNext(); ) {
				FunctionArgument param = iterator.next();
				if (parameterInfo.name.equals(param.parameterName)) {
					iterator.remove();
					return param.value;
				}
			}

			// find first unnamed then
			for (Iterator<FunctionArgument> iterator = params.iterator(); iterator.hasNext(); ) {
				FunctionArgument param = iterator.next();
				if (param.parameterName == null) {
					iterator.remove();
					return param.value;
				}
			}
			return parameterInfo.defaultValue;
		}
/** Finds named argument or uses the first unnamed - <b>mutates the params list</b>. */
Finds named argument or uses the first unnamed - mutates the params list.
Finds named argument or uses the first unnamed - mutates the params list .
private Object resolveParam(List<FunctionArgument> params, ParameterInfo parameterInfo) {
			for (Iterator<FunctionArgument> iterator = params.iterator(); iterator.hasNext(); ) {
				FunctionArgument param = iterator.next();
				if (parameterInfo.name.equals(param.parameterName)) {
					iterator.remove();
					return param.value;
				}
			}
			for (Iterator<FunctionArgument> iterator = params.iterator(); iterator.hasNext(); ) {
				FunctionArgument param = iterator.next();
				if (param.parameterName == null) {
					iterator.remove();
					return param.value;
				}
			}
			return parameterInfo.defaultValue;
		}
private Object resolveParam ( List < FunctionArgument > params , ParameterInfo parameterInfo ) { for ( Iterator < FunctionArgument > iterator = params . iterator ( ) ; iterator . hasNext ( ) ; ) { FunctionArgument param = iterator . next ( ) ; if ( parameterInfo . name . equals ( param . parameterName ) ) { iterator . remove ( ) ; return param . value ; } } for ( Iterator < FunctionArgument > iterator = params . iterator ( ) ; iterator . hasNext ( ) ; ) { FunctionArgument param = iterator . next ( ) ; if ( param . parameterName == null ) { iterator . remove ( ) ; return param . value ; } } return parameterInfo . defaultValue ; }
Finds named argument or uses the first unnamed - <b>mutates the params list</b>.
Finds named argument or uses the first unnamed - <b > mutates the params list< / b > .
// find first unnamed then