Skip to content

This repository contains a collection of Scheme code implementing functions that cover topics such as functional programming paradigms, recursion, mathematical computations, and list manipulation.

License

Notifications You must be signed in to change notification settings

X-XENDROME-X/Functional-Scheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Functional Scheme

This repository contains a collection of Scheme code which covers topics such as functional programming paradigms, recursion, mathematical computations, and list manipulation.

Table of Contents

  • Functions
  • Final Fantasy Calculation Functions
  • Recursive Math
  • List Manipulation
  • Multiply Number List
  • Functions as Parameters

Functions

Part 1: Basic Mathematical Operations

  • run1: Addition of three numbers.
  • run2: Complex mathematical expression involving multiplication and addition.
  • run3: Mathematical expression with subtraction and division.
  • run4: Another complex mathematical expression.
  • run5: Yet another complex mathematical expression.

Part 2: Visiting Final Fantasy

Part A: Damage Calculation Functions

  • ffMQ-Damage: Calculate damage in the Final Fantasy game based on attack, defence, weakness, and targets.
  • ff10-baseDamage: Calculate base damage in Final Fantasy X.
  • ff10-defenseNum: Calculate the defence number in Final Fantasy X.
  • ff10-reduceDamage: Reduce damage in Final Fantasy X.
  • ff10-finalDamage: Calculate final damage in Final Fantasy X.
  • ff10-calculate-damage: Overall damage calculation function in Final Fantasy X.

Part 3: Recursive Math

Part A: Factorial Calculation

  • factorial: Recursive factorial calculation.
  • alt-factorial: Alternative recursive factorial calculation.

Part 4: List Manipulation

Part A: Retrieving Items from a List

  • get-second-item: Retrieve the second item from a list.
  • get-third-item: Retrieve the third item from a list.

Part B: List Length

  • list-length?: Calculate the length of a nested list.

Part C: Arbitrary Cdr

  • arbitrary-cdr: Retrieve the Cdr of a list based on a given number.

Part D: Creating Lists

  • make-list: Create a list with repeated elements.

Part 5: Multiply Number List

Part A: Checking Number Lists

  • number-list?: Check if a list is a valid number list.
  • multiply-number-list: Multiply numbers in a valid number list.

Part 6: Functions as Parameters

Part A: Comparing Functions

  • which-function: Compare two functions based on their results for a given input.

About

This repository contains a collection of Scheme code implementing functions that cover topics such as functional programming paradigms, recursion, mathematical computations, and list manipulation.

Topics

Resources

License

Stars

Watchers

Forks

Languages