File: test-auto_replace.3.R

package info (click to toggle)
r-cran-lambda.r 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 284 kB
  • sloc: sh: 9; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 269 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
test.auto_replace_3 <- function() {
  fib(0) %as% 2
  fib(0) %as% 1
  fib(1) %as% 1
  fib(n=5) %as% { fib(n-1) - fib(n-2) }
  fib(n=2) %as% { fib(n-1) + fib(n-2) }
  seal(fib)

  # These are failing
  act.1 <- fib(3)
  act.2 <- fib(2)

  (act.1 == 3)
  (act.2 == 2)
}