Paste: more noob questions

Author: blei
Mode: text
Date: Mon, 2 Aug 2010 19:17:00
Plain Text |
trimHead(seq, predicate) {
    var n = size(seq);
    if (n == 0)
        return seq;
    var i = 0;
    while (i < n and predicate(seq[i]))
        i += 1;
    return slice(seq, i);
}


###############################
    while (i < n and predicate(seq[i]))
        i += 1;
    return slice(seq, i);
----^
}

###############################
/home/philipp/programming/clay/build/compiler/src/../../../lib-clay/io/directories/raw/raw.linux.clay(45,4): error: argument 1: type mismatch

compilation context: 
  trimHead(Slice[SequenceHandle[StringConstant]], LambdaFreeVars)
  appendPath(StringConstant, StringConstant)
  main()
  getExitCode()
  callMain(Static[main])

New Annotation

Summary:
Author:
Mode:
Body: