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
(define-module (async) | |
#:export (make-channel | |
ch-write | |
ch-read | |
fiber)) | |
(use-modules (ice-9 match) | |
(ice-9 atomic) | |
(ice-9 q) | |
(ice-9 threads) |
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
data Tree a = Nil Int | Leaf Int [a] | Node Int [a] [Tree a] deriving Show | |
find :: (Ord a, Eq a) => Tree a -> a -> Bool | |
find (Nil _) _ = False | |
find (Leaf _ []) _ = False | |
find (Leaf m (k:ks)) x | |
| x == k = True | |
| x < k = False | |
| x > k = find (Leaf m ks) x | |
find (Node _ [] (t:ts)) x = find t x |
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
module PushNotifications | |
class Enqueuer | |
attr_accessor :user | |
def initialize(u) | |
@user = u | |
end | |
def enqueue(payload) | |
token = User::DeviceToken.where(user_id: user.id, token_type: 'ios').last |
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
import 'package:flutter/material.dart'; | |
import 'menu/app_drawer.dart'; | |
import 'state.dart'; | |
import 'package:get/get.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class AState { |
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
(ns app | |
(:require [clojure.string :refer [replace]])) | |
(def s1 "[[][{]]") | |
(def s2 "[[]][][{]}[]") | |
(def s3 "[[{}][]]") |
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
(ns app | |
(:require [clojure.string :refer [replace]])) | |
(def s1 "[[][{]]") | |
(def s2 "[[]][][{]}[]") | |
(def s3 "[[{}][]]") |
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
(ns app | |
(:require [clojure.string :refer [replace]])) | |
(def s1 "[[][{]]") | |
(def s2 "[[]][][{]}[]") | |
(def s3 "[[{}][]]") |
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
(ns app | |
(:require [clojure.string :refer [replace]])) | |
(def s1 "[[][{]]") | |
(def s2 "[[]][][{]}[]") | |
(def s3 "[[{}][]]") |
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
#lang racket/load | |
(define (add-rat x y) | |
(make-rat (+ (* (numer x) (denom y)) | |
(* (numer y) (denom x))) | |
(* (denom x) (denom y)))) | |
(define (sub-rat x y) | |
(make-rat (- (* (numer x) (denom y)) | |
(* (numer y) (denom x))) |
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
#lang racket/load | |
(define (add-rat x y) | |
(make-rat (+ (* (numer x) (denom y)) | |
(* (numer y) (denom x))) | |
(* (denom x) (denom y)))) | |
(define (sub-rat x y) | |
(make-rat (- (* (numer x) (denom y)) | |
(* (numer y) (denom x))) |
NewerOlder