Skip to content

Commit

Permalink
Updating: very very minorly
Browse files Browse the repository at this point in the history
  • Loading branch information
githwxi committed Sep 14, 2024
1 parent 6356712 commit fa5c19b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
20 changes: 11 additions & 9 deletions contrib/README
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
###### start of [README] ######
##################################################################
######################## beg of [README] #########################
##################################################################

This is a place for contributed code.

In general, if you have a question on something
(e.g., the syntax of ATS3), please open an issue
on Github.
In general, if you have a question on something (e.g., the syntax
of ATS3), please open an issue on Github.

There is a library libxatsopt for ATS3(ATS/Xanadu).
If you create a tool for ATS3, you may want to consider
using this library (instead of relying on the source
code for ATS3).
There is a library for ATS3(ATS/Xanadu) that is given the name
[libxatsopt]. If you create a tool for ATS3, please consider using
this library (instead of relying on the source code for ATS3).

###### finish of [README] ######
##################################################################
######################## end of [README] #########################
##################################################################
2 changes: 1 addition & 1 deletion prelude/SATS/bool000.sats
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fun
<a:t0>
bool_ifval
{b:b0}
(b: bool(b), x: a, y: a): (a)
(b: bool(b), x: a, y: a): (a) // fun
//
#symload ifval with bool_ifval of 1000
//
Expand Down
15 changes: 15 additions & 0 deletions prelude/TEST/CATS/JS/DATA/data00_fact000.dats
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(* ****** ****** *)
(* ****** ****** *)
//
fun
fact_loop(i, r) =
if i < fact_n
then fact_loop(i+1, (i+1)*r) else r
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)

(* end of [ATS3/XANADU_prelude_TEST_CATS_JS_DATA_data00_fact000.dats] *)
20 changes: 20 additions & 0 deletions prelude/TEST/CATS/JS/test99_mydiary.dats
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ val ( ) = prints("ABAB = ", ABAB, "\n")
(* ****** ****** *)
(* ****** ****** *)
//
fun
fact(n: sint): sint =
fact_loop(0(*i*), 1(*r*))
where
{
val
fact_n = n
#include "./DATA/data00_fact000.dats" }
//
(* ****** ****** *)
//
local
val N0 = 10
val () =
prints("fact(", N0, ") = ", fact(N0), "\n")
endloc//local
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)

Expand Down

0 comments on commit fa5c19b

Please sign in to comment.