This file contains 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
<template> | |
<div :class="'message' + (mentioned ? ' mentioned' : '')"> | |
<div class="header"> | |
<figure class="avatar"> | |
<img :src="avatarUrl" alt=""> | |
</figure> | |
<div class="post-info"> | |
<strong class="nick" v-if="!isAction">{{ poster }}</strong> | |
<span class="timestamp">{{ timestamp }}</span> | |
</div> |
This file contains 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
(defn fibonacci [number] | |
(if (<= number 1) number | |
(+ (fibonacci (- number 1)) (fibonacci (- number 2))))) | |
(map fibonacci (range 0 29)) |
This file contains 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
(def numbers [ | |
[8 2] [5 4] [9 6] | |
[7 5] [20 3] [30 1] | |
[18 4] [10 5] | |
]) | |
(map (fn [pair] | |
(pair 0) "+" (pair 1) | |
"=" |
This file contains 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
class PrimeFactors | |
def self.of number | |
PrimeFactors.new(number).calculate | |
end | |
def initialize number | |
@number = number | |
@divisor = 2 | |
@primes = [] | |
end |