Skip to content

Commit

Permalink
Add function parameter comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Nov 14, 2024
1 parent a511135 commit 14f6106
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 7 deletions.
4 changes: 3 additions & 1 deletion exercises/practice/acronym/acronym.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Acronym ← |1 ⟜(⍤"Please implement the Acronym function")
# Determine a sentence's acronym
# Acronym ? Sentence
Acronym ← |1 ⟜(⍤"Please implement the Acronym function")
4 changes: 3 additions & 1 deletion exercises/practice/bob/bob.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
HeyBob ← |1 (⍤ "Please implement HeyBob").
# Respond to a phrase as Bob would
# Response ? Phrase
HeyBob ← |1 ⊙(⍤ "Please implement HeyBob" 0)
2 changes: 2 additions & 0 deletions exercises/practice/collatz-conjecture/collatz-conjecture.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Calculate the number of steps of a number using the Collatz Conjecture
# NumberOfSteps ? Number
Steps ← |1 ⊙(⍤ "Please implement Steps" 0)
2 changes: 2 additions & 0 deletions exercises/practice/darts/darts.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Calculate a score for a given point in a game of darts
# Score ? X Y
Score ← |2 ⍤"Please implement Score" ⊙⊙
12 changes: 10 additions & 2 deletions exercises/practice/difference-of-squares/difference-of-squares.ua
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
SquareOfSum ← |1 ⊙(⍤ "Please implement SquareOfSum" 0)
SumOfSquares ← |1 ⊙(⍤ "Please implement SumOfSquares" 0)
# Calculate the square of the sums of the first N natural numbers
# SquareOfSum ? Number
SquareOfSum ← |1 ⊙(⍤ "Please implement SquareOfSum" 0)

# Calculate the sum of the squares of the first N natural numbers
# SumOfSquares ? Number
SumOfSquares ← |1 ⊙(⍤ "Please implement SumOfSquares" 0)

# Calculate the difference between the square of sums and sum of squares
# DifferenceOfSquares ? Number
DifferenceOfSquares ← |1 ⊙(⍤ "Please implement DifferenceOfSquares" 0)
2 changes: 2 additions & 0 deletions exercises/practice/eliuds-eggs/eliuds-eggs.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Decode the number of eggs from its encoded value
# EggCount ? EncodedEggCount
EggCount ← |1 ⊙(⍤ "Please implement EggCount" 0)
2 changes: 2 additions & 0 deletions exercises/practice/hamming/hamming.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Calculate the Hamming distance between two DNA strands
# Distance ? Strand1 Strand1
Distance ← |2 ⍤"Please implement Distance" ⊙⊙
1 change: 1 addition & 0 deletions exercises/practice/hello-world/hello-world.ua
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Say hello to the world!
Hello ← |0 "Goodbye, Mars!"
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Find the largest product of a contiguous substring of digits of length N.
# Product ? Input Span
LargestProduct ← |2 ⊙(⍤ "Please implement LargestProduct")
5 changes: 3 additions & 2 deletions exercises/practice/leap/leap.ua
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Leap ← |2 ⍤"Please implement the Leap function" ⊙⊙

# Determine if a year is a leap year
# IsLeapYear ? Year
Leap ← |1 ⊙(⍤"Please implement the Leap function" 0)
4 changes: 3 additions & 1 deletion exercises/practice/two-fer/two-fer.ua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
TwoFer ←|1 ⊙(⍤ "Please implement TwoFer" "")
# Return the greeting message
# Greeting | Name
TwoFer ← |1 ⊙(⍤ "Please implement TwoFer" "")

0 comments on commit 14f6106

Please sign in to comment.