Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Your top-ten linux desktop apps


At Tue, 27 Sep 2005 14:12:54 +1000, Erik de Castro Lopo wrote:
>     let integer_array = [| 1 ; -2 ; 3 ; -4 ; 5 ; -6 ;
>         -7 ; 8 ; -9 ; 32727000 |] ;;
> 
>     Array.mapi (fun i x
>         -> Printf.printf "integer_array[%d] = %d\n" i x
>         ) integer_array ;;

Hey, my first actual perl6 program:

 #!/usr/bin/pugs
 use v6;

 my @integer_array = <1 -2 3 -4 5 -6 -7 8 -9 32727000>;

 for 0 .. @integer_array - 1 {
   say "integer_array[$_] = @integer_array[$_]";
 }


-- 
 - Gus