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
(define nand | |
(lambda (a b) (match (list a b) | |
[(list 1 1) 0] | |
[(list _ _) 1]))) | |
(define not | |
(lambda (a) (nand a a))) | |
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
const extract = $$('div.hit').reduce((prev, ele) => | |
[...prev, { | |
title : ele.querySelector("a.hitlnk_name").innerText, | |
subtitle : ele.querySelector("div.category")?.innerText, | |
address : ele.querySelector("address")?.innerText}], | |
[]) | |
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
import { SitemapBuilder } from "next-sitemap"; | |
import fs from "fs"; | |
import crypto from "crypto"; | |
const toChunks = (arr, chunkSize) => { | |
return arr.reduce( | |
(prev, _, i) => | |
i % chunkSize ? prev : [...prev, arr.slice(i, i + chunkSize)], | |
[] | |
); |
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
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const urls = [ | |
"https://www.forum.hr/showthread.php?t=777980&page=11", | |
"https://www.forum.hr/showthread.php?t=232045" | |
]; | |
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
function intoBinary(num) { | |
if (num === 0 || num === 1) { | |
return num; | |
} | |
function inner(str, idx) { | |
// mutation block | |
let A = "0" + str; | |
let B = str + "0"; | |
let C = "1" + str; | |
let D = str + "1"; |
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
const __ = {"DUMMY_INPUT"=true}; | |
function isDummyInput(a) { | |
return ( | |
a != null && typeof a === "object" && a["DUMMY_INPUT"] === true | |
); | |
} | |
function curry1(fn) { | |
return function f1(a) { |