cannot infer argument types

bioinfornatics bioinfornatics at fedoraproject.org
Wed Nov 13 03:43:13 PST 2013


On Wednesday, 13 November 2013 at 02:43:42 UTC, bioinfornatics 
wrote:
> Hi,
>
> I have this error message ( i.e title ) and i do not see where 
> i am wrong:
>
>
>     this( in ubyte wordLength, in string sequence ){
>         kMer = wordLength;
>         bytePerChar = cast(ubyte)(T.sizeof / kMer);
>
>         char[ubyte] toCharTmp;
>         ubyte[char] toNumTmp;
>         foreach( ubyte i, const char letter; 
> sequence.dup.sort.uniq() ){
>             if(i !in toCharTmp)
>                 toCharTmp[ i ]  = letter;
>             toNumTmp[ letter ]  = i;
>         }
>         toChar  = toCharTmp.rehash;
>         toNum   = toNumTmp.rehash;
>     }
>
> Error is given at <foreach line>
>
> I have removed explicit type on this line… but I have always 
> same error!

Thanks a lot Davis and bearophile that is really interesting I 
though that I used std.algorithm.sort not a builtin… .


More information about the Digitalmars-d-learn mailing list