Skip to content

factorial does not work, error line 5 #43

Description

@SteveJustin1963
:F
  "           // Duplicate n
  1 >         // Check if n > 1
  (           // If true
    " 1 - F * // n * factorial(n - 1)     <<<<<<<<<<<<<< error, never gets to do `*`
  ) /E (      // Else condition wrapped in parentheses
    1         // Return 1
  )
;
5 F .         // Calculate factorial of 5, prints: 120

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions