Ejemplo n.º 1
0
from languages.clojure import ClojureEvalTask

# Description
# Write a function `triangle-row` to calculate n-th row of pascal triangle.

task = ClojureEvalTask()
task.test_descriptions = ["Checks 1st row.",
                          "Checks 3rd row.",
                          "Checks >25nth row."]
Ejemplo n.º 2
0
from languages.clojure import ClojureEvalTask
import os

# Description
# Write a macro 'defargs' that similar to defn but require default values for all arguments.

task = ClojureEvalTask()
task.test_descriptions = ["Example from task description.",
                          "Example from task description.",
                          "Example from task description.",
                          "Atom as default argument.",
                          "Atom as default argument."]
Ejemplo n.º 3
0
from languages.clojure import ClojureEvalTask

# Description
# Write function palindrome? to determine whether passed sequence palindrome or not

task = ClojureEvalTask()

task.test_descriptions = ["Checks collection of single element.",
                          "Checks collection.",
                          "Checks collection that contains other collections.",
                          "Checks collection.",
                          "Checks collection of keywords.",
                          "Checks string.",
                          "Checks string.",
                          "Checks string."]
Ejemplo n.º 4
0
from languages.clojure import ClojureEvalTask

# Description
# Write << macro for string interpolation

task = ClojureEvalTask()

task.test_descriptions = ["First example from task description.",
                          "Second example from task description.",
                          "Many nested s-exps inside interpolated s-exp.",
                          "Third example from task description.",
                          "Fourth example from task description.",
                          "Checks that all passed strings in macro are concatenated."]