chsasank / llama.lisp

Lisp dialect designed for HPC and AI
GNU Lesser General Public License v2.1
14 stars 6 forks source link

Replace "define" keyword used along with function declaration that has no defintion with "declare". #96

Open adi-lb-phoenix opened 1 month ago

adi-lb-phoenix commented 1 month ago

For example in c-lisp we have the code (define ((putchar int) (n int))), we will have to change that (declare ((putchar int) (n int))), (define ((fprint float) (n float) )) to (declare ((fprint float) (n float) )).

Make changes to only those function that do not have any definition associated with them. For example the below code has a definition associated with them. So do not touch it.

(define ((fib int) (n int))
        (if (lt n 3)
            (ret (sub n 1)))

        (ret (add
            (call fib (sub n 1))
            (call fib (sub n 2)))))