;; -*-theme-d-*-

;; Copyright (C) 2008-2018 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.

;; Expected results: translation and running OK


(define-proper-program (tests test295)


  (import (standard-library core)
	  (standard-library console-io))

  (define x-apply
    (unchecked-param-prim-proc _b_apply-impl
  			       (%arglist %result)
  			       ((:procedure ((splice %arglist)) %result pure)
  				%arglist)
  			       %result
  			       pure))


  (define x-apply-nonpure
    (unchecked-param-prim-proc _b_apply-impl
  			       (%arglist %result)
  			       ((:procedure ((splice %arglist)) %result nonpure)
  				%arglist)
  			       %result
  			       nonpure))


  (define main
    (lambda (() <none> nonpure)
      (let ((a (x-apply + (list 1 2))))
	(console-display-line a)
	(x-apply-nonpure console-display (list 2.5))
	(console-newline)))))
