mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 18:58:56 -06:00
the NQueens algorithm written in GF
This commit is contained in:
15
examples/nqueens/NatAscii.gf
Normal file
15
examples/nqueens/NatAscii.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
concrete NatAscii of Nat = {
|
||||
|
||||
lincat Nat = Str ;
|
||||
|
||||
lin zero = "" ;
|
||||
succ n = "_" ++ n ;
|
||||
|
||||
lincat LT = Str ;
|
||||
NE = {} ;
|
||||
Plus = {} ;
|
||||
|
||||
lin zLT n = n ;
|
||||
sLT _ _ l = l ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user