Skip to content

Provide Function Name in Code File #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
3f09789
Update hamming.el
nitincodery Sep 20, 2022
1d3cbed
Update hamming.el
nitincodery Sep 20, 2022
1b72120
Merge branch 'exercism:main' into patch-1
nitincodery Sep 28, 2022
0b9f99a
Update hello-world-test.el
nitincodery Sep 28, 2022
d5de4be
Update hamming-test.el
nitincodery Sep 28, 2022
bf7373d
Update acronym-test.el
nitincodery Sep 28, 2022
280da23
Update acronym.el
nitincodery Sep 28, 2022
926a72e
Update allergies.el
nitincodery Sep 28, 2022
37dcb57
Update example.el
nitincodery Sep 28, 2022
592b7ee
Update allergies-test.el
nitincodery Sep 28, 2022
0e7092c
Update example.el
nitincodery Sep 28, 2022
d4cc582
Update allergies.el
nitincodery Sep 28, 2022
20823cd
Update allergies.el
nitincodery Sep 28, 2022
ce4b6e5
Update anagram.el
nitincodery Sep 30, 2022
8adba5d
Update anagram-test.el
nitincodery Sep 30, 2022
73ccac5
Update hamming-test.el
nitincodery Sep 30, 2022
fb3a0b4
Update hamming.el
nitincodery Sep 30, 2022
aadb6d7
Update allergies.el
nitincodery Sep 30, 2022
f4ff1c3
Update example.el
nitincodery Sep 30, 2022
7a28511
Update allergies-test.el
nitincodery Sep 30, 2022
21e376d
Update allergies-test.el
nitincodery Sep 30, 2022
79a5442
Update armstrong-numbers.el
nitincodery Sep 30, 2022
c422904
Update armstrong-numbers-test.el
nitincodery Sep 30, 2022
67a4425
Update atbash-cipher.el
nitincodery Sep 30, 2022
17ac9af
Update atbash-cipher-test.el
nitincodery Sep 30, 2022
c426796
Update binary.el
nitincodery Sep 30, 2022
6a0b901
Update binary-test.el
nitincodery Sep 30, 2022
7598f72
Update bob.el
nitincodery Sep 30, 2022
023d554
Update bob.el
nitincodery Sep 30, 2022
fa41eeb
Update bob-test.el
nitincodery Sep 30, 2022
6eafa14
Update crypto-square.el
nitincodery Sep 30, 2022
264e671
Update crypto-square-test.el
nitincodery Sep 30, 2022
8155386
Update difference-of-squares.el
nitincodery Sep 30, 2022
49d5e0c
Update difference-of-squares-test.el
nitincodery Sep 30, 2022
ea1f543
Update etl.el
nitincodery Sep 30, 2022
0db0fb2
Update etl-test.el
nitincodery Sep 30, 2022
9d1726f
Update gigasecond.el
nitincodery Sep 30, 2022
dfb4833
Update gigasecond-test.el
nitincodery Sep 30, 2022
183d66d
Update grains.el
nitincodery Sep 30, 2022
51229ee
Update grains-test.el
nitincodery Sep 30, 2022
8941102
Update leap.el
nitincodery Sep 30, 2022
57d712b
Update leap-test.el
nitincodery Sep 30, 2022
47aea7d
Update luhn.el
nitincodery Sep 30, 2022
a5c5cd2
Update luhn-test.el
nitincodery Sep 30, 2022
1632c98
Update nucleotide-count.el
nitincodery Sep 30, 2022
bd80206
Update nucleotide-count-test.el
nitincodery Sep 30, 2022
3c58449
Update pangram.el
nitincodery Sep 30, 2022
92c4c4b
Update pangram-test.el
nitincodery Sep 30, 2022
5f794eb
Update perfect-numbers-test.el
nitincodery Sep 30, 2022
426dcf7
Update raindrops.el
nitincodery Sep 30, 2022
574477b
Update raindrops-test.el
nitincodery Sep 30, 2022
1422375
Update word-count-test.el
nitincodery Oct 2, 2022
1ed021c
Update word-count.el
nitincodery Oct 2, 2022
7d9747f
Update two-fer.el
nitincodery Oct 2, 2022
45d8e86
Update two-fer-test.el
nitincodery Oct 2, 2022
bf5307e
Update trinary-test.el
nitincodery Oct 2, 2022
eaf89cd
(Optional Update) Added `eval-buffer` step
nitincodery Oct 2, 2022
4ec47f9
Update trinary.el
nitincodery Oct 2, 2022
92015bf
Update run-length-encoding-test.el
nitincodery Oct 2, 2022
e95a7cf
Update run-length-encoding.el
nitincodery Oct 2, 2022
f1f3f49
Update roman-numerals-test.el
nitincodery Oct 2, 2022
5a883eb
Update roman-numerals.el
nitincodery Oct 2, 2022
318cb90
Update rna-transcription-test.el
nitincodery Oct 2, 2022
bbdcaaa
Update rna-transcription-test.el
nitincodery Oct 2, 2022
986a02f
Update rna-transcription.el
nitincodery Oct 2, 2022
5aaa8f9
Update phone-number-test.el
nitincodery Oct 2, 2022
703ec0d
Update phone-number.el
nitincodery Oct 2, 2022
7e2b792
Update robot-name.el
nitincodery Oct 2, 2022
0a1bb65
Update robot-name-test.el
nitincodery Oct 2, 2022
2ed73ab
Update robot-name.el
nitincodery Oct 2, 2022
9e9574e
Update perfect-numbers.el
nitincodery Oct 2, 2022
cef3ec8
Update raindrops.el
nitincodery Oct 2, 2022
116a753
Update rna-transcription.el
nitincodery Oct 2, 2022
c37dfe6
Update perfect-numbers.el
nitincodery Oct 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/practice/acronym/acronym-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code

(load-file "acronym.el")
(declare-function acronym "acronym.el" (phrase))

(ert-deftest basic ()
(should (equal "PNG" (acronym "Portable Network Graphics"))))
Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/acronym/acronym.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

;;; Commentary:

(defun acronym (phrase)
;;; Code:

(require 'cl-lib)

)

(provide 'acronym)
;;; acronym.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/allergies/.meta/example.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*allergens-scores*)))

(defun allergic-to-p (score allergen)
"Allergic-to predicate based on SCORE and ALLERGEN."
"Check if Allergic to allergen based on SCORE and ALLERGEN."
(score-matches (cl-assoc allergen *allergens-scores* :test #'string=)
score))

Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/allergies/allergies-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

;;; Code:

(load-file "allergies.el")
(declare-function allergen-list "allergies.el" (score))
(declare-function allergic-to-p "allergies.el" (score allergen))

(ert-deftest no-allergies-at-all ()
(should (equal '() (allergen-list 0))))
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/allergies/allergies.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

;;; Commentary:

(defun allergen-list (score)
"List all allergens with a given SCORE."
;;; Code:
)


(defun allergic-to-p (score allergen)
"Check if Allergic to allergen based on SCORE and ALLERGEN."
;;; Code:
)

(provide 'allergies)
;;; allergies.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/anagram/anagram-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "anagram.el")
(declare-function anagrams-for "anagram.el" (subject candidates))

(ert-deftest no-matches ()
(should (equal '() (anagrams-for
Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/anagram/anagram.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

;;; Commentary:

(defun anagrams-for (subject candidates)
;;; Code:

(require 'cl-lib)

)

(provide 'anagram)
;;; anagram.el ends here
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "armstrong-numbers.el")
(declare-function armstrong-p "armstrong-numbers.el" (n))

(ert-deftest armstrong-number-5 ()
"Single digit numbers are Armstrong numbers"
Expand Down
2 changes: 2 additions & 0 deletions exercises/practice/armstrong-numbers/armstrong-numbers.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

;;; Commentary:

(defun armstrong-p (n)
;;; Code:
)

(provide 'armstrong-numbers)
;;; armstrong-numbers.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/atbash-cipher/atbash-cipher-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

(require 'cl-lib)

(load-file "atbash-cipher.el")
(declare-function encode "atbash-cipher.el" (plaintext))

(ert-deftest encode-no ()
(should (equal "ml" (encode "no"))))
Expand Down
10 changes: 2 additions & 8 deletions exercises/practice/atbash-cipher/atbash-cipher.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

;;; Commentary:




;;; Code:

(defun encode (plaintext)
"Encode PLAINTEXT to atbash-cipher encoding."

)

;;; Code:
)

(provide 'atbash-cipher)
;;; atbash-cipher.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/binary/binary-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "binary.el")
(declare-function to-decimal "binary.el" (binary-string))

(ert-deftest binary-1-is-decimal-1 ()
(should (= 1 (to-decimal "1"))))
Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/binary/binary.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

;;; Commentary:

(defun to-decimal (binary-string)
;;; Code:



)

(provide 'binary)
;;; binary.el ends here
3 changes: 1 addition & 2 deletions exercises/practice/bob/bob-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

;;; Code:

(load-file "bob.el")

(declare-function response-for "bob.el" (phrase))

(ert-deftest responds-to-stating-something ()
(should (string= "Whatever." (response-for "Tom-ay-to, tom-aaaah-to."))))
Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/bob/bob.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

(defun response-for (phrase)
;;; Code:

)

(provide 'bob)
;;; bob.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/crypto-square/crypto-square-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "crypto-square.el")
(declare-function encipher "crypto-square.el" (plaintext))

(ert-deftest empty-plaintext-results-in-an-empty-ciphertext ()
(should (equal "" (encipher ""))))
Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/crypto-square/crypto-square.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

(defun encipher (plaintext)
;;; Code:

)

(provide 'crypto-square)
;;; crypto-square.el ends here
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

;;; Code:

(load-file "difference-of-squares.el")
(declare-function sum-of-squares "difference-of-squares.el" (n))
(declare-function square-of-sum "difference-of-squares.el" (n))
(declare-function difference "difference-of-squares.el" (n))

(ert-deftest square-of-sum-to-5 ()
(should (= 225 (square-of-sum 5))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

;;; Commentary:

(defun sum-of-squares (n)
;;; Code:
)

(defun square-of-sum (n)
;;; Code:
)

(defun difference (n)
;;; Code:
)

(provide 'difference-of-squares)
;;; difference-of-squares.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/etl/etl-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "etl.el")
(declare-function etl "etl.el" (data))


(defconst mixed-case-input #s(hash-table
Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/etl/etl.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

(defun etl (data)
;;; Code:

)

(provide 'etl)
;;; etl.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/gigasecond-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

;;; Code:

(load-file "gigasecond.el")
(declare-function from "gigasecond.el" (second minute hour day month year))

(ert-deftest from-lisp-epoch ()
(should
Expand Down
8 changes: 2 additions & 6 deletions exercises/practice/gigasecond/gigasecond.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
;; NB: Pay attention to Emacs' handling of time zones and dst
;; in the encode-time and decode-time functions.

(defun from (second minute hour day month year)
;;; Code:






)

(provide 'gigasecond)
;;; gigasecond.el ends here
3 changes: 2 additions & 1 deletion exercises/practice/grains/grains-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

;;; Code:

(load-file "grains.el")
(declare-function square "grains.el" (n))
(declare-function total "grains.el")

(ert-deftest square-1 ()
(should (= 1 (square 1))))
Expand Down
6 changes: 5 additions & 1 deletion exercises/practice/grains/grains.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

;;; Commentary:

(defun square (n)
;;; Code:
)


(defun total ()
;;; Code:
)

(provide 'grains)
;;; grains.el ends here
4 changes: 1 addition & 3 deletions exercises/practice/hamming/hamming-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

;;; Code:

(load-file "hamming.el")

(declare-function hamming-distance "hamming.el")
(declare-function hamming-distance "hamming.el" (dna1 dna2))

(ert-deftest empty-strands ()
(should (= 0 (hamming-distance "" ""))))
Expand Down
5 changes: 3 additions & 2 deletions exercises/practice/hamming/hamming.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

;;; Code:

(defun hamming-distance (dna1 dna2)
;;; Code:
)

(provide 'hamming)
;;; hamming.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/hello-world/hello-world-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

;;; Code:

(load-file "hello-world.el")
(declare-function hello "hello-world.el")

(ert-deftest hello-world-test ()
(should (string= (hello) "Hello, World!")))
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/leap/leap-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;;; Commentary:

;;; Code:
(load-file "leap.el")
(declare-function leap-year-p "leap.el" (year))

(ert-deftest vanilla-leap-year ()
(should (leap-year-p 1996)))
Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/leap/leap.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

(defun leap-year-p (year)
;;; Code:

)

(provide 'leap-year-p)
;;; leap.el ends here
3 changes: 2 additions & 1 deletion exercises/practice/luhn/luhn-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
;;; Code:

(require 'cl-lib)
(load-file "luhn.el")

(declare-function luhn-p "luhn.el" (str))

(ert-deftest an-empty-string ()
(should-not (luhn-p "")))
Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/luhn/luhn.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

;;; Commentary:

(defun luhn-p (str)
;;; Code:



)

(provide 'luhn)
;;; luhn.el ends here
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;;; Code:

(load-file "nucleotide-count.el")
(declare-function nucleotide-count "nucleotide-count.el" (sequence))


(defun sort-pairs (lst fn)
Expand Down
3 changes: 2 additions & 1 deletion exercises/practice/nucleotide-count/nucleotide-count.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

;;; Commentary:

(defun nucleotide-count (sequence)
;;; Code:

)

(provide 'nucleotide-count)
;;; nucleotide-count.el ends here
2 changes: 1 addition & 1 deletion exercises/practice/pangram/pangram-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

;;; Code:

(load-file "pangram.el")
(declare-function is-pangram "pangram.el" (phrase))

(ert-deftest sentence-empty ()
(should (equal nil (is-pangram ""))))
Expand Down
Loading