diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /tests/examplefiles/example.gi | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'tests/examplefiles/example.gi')
-rw-r--r-- | tests/examplefiles/example.gi | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/examplefiles/example.gi b/tests/examplefiles/example.gi deleted file mode 100644 index c9c5e55d..00000000 --- a/tests/examplefiles/example.gi +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################# -## -#W example.gd -## -## This file contains a sample of a GAP implementation file. -## - - -############################################################################# -## -#M SomeOperation( <val> ) -## -## performs some operation on <val> -## -InstallMethod( SomeProperty, - "for left modules", - [ IsLeftModule ], 0, - function( M ) - if IsFreeLeftModule( M ) and not IsTrivial( M ) then - return true; - fi; - TryNextMethod(); - end ); - - - -############################################################################# -## -#F SomeGlobalFunction( ) -## -## A global variadic funfion. -## -InstallGlobalFunction( SomeGlobalFunction, function( arg ) - if Length( arg ) = 3 then - return arg[1] + arg[2] * arg[3]; - elif Length( arg ) = 2 then - return arg[1] - arg[2] - else - Error( "usage: SomeGlobalFunction( <x>, <y>[, <z>] )" ); - fi; - end ); - - -# -# A plain function. -# -SomeFunc := function(x, y) - local z, func, tmp, j; - z := x * 1.0; - y := 17^17 - y; - func := a -> a mod 5; - tmp := List( [1..50], func ); - while y > 0 do - for j in tmp do - Print(j, "\n"); - od; - repeat - y := y - 1; - until 0 < 1; - y := y -1; - od; - return z; -end; -
\ No newline at end of file |