This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'action_view' | |
require 'active_support' | |
require 'mustache' | |
class Mustache | |
# Remember to use {{{yield}}} (3 mustaches) to skip escaping HTML | |
# Using {{{tag}}} will skip escaping HTML so if your mustache methods return | |
# HTML, be sure to interpolate them using 3 mustaches. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconstrainedfn sqr | |
"Calculates the square of a number." | |
([n] | |
:requires | |
"argument must be a number" | |
(number? n) | |
"argument cannot be zero" | |
(not (zero? n)) | |
:ensures |