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 | |
(struct student (roll name marks)) | |
(define (get-input!) | |
(read-line (current-input-port))) | |
(define (get-number!) (string->number (get-input!))) | |
(displayln "Enter the number of students") |
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
;;; init.el -- Config | |
;;; Commentary: | |
;;; custom Emacs config | |
;;; Code: | |
(let ((bootstrap-file (concat user-emacs-directory "straight/repos/straight.el/bootstrap.el")) | |
(bootstrap-version 3)) | |
(unless (file-exists-p bootstrap-file) | |
(with-current-buffer | |
(url-retrieve-synchronously |
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
#include <gdnative_api_struct.gen.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ecl/ecl.h> | |
/*************/ | |
/* Setup ecl */ | |
/*************/ |
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
type SimpleState = State [Int] | |
push :: Int -> SimpleState () | |
push x = do | |
modify (x:) | |
return () | |
pop :: SimpleState Int | |
pop = do | |
c <- get |
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
{-# LANGUAGE NamedFieldPuns #-} | |
module Lib where | |
import Control.Concurrent.STM | |
import Control.Monad | |
import Control.Monad.State | |
import Control.Concurrent.STM.TChan | |
import Control.Concurrent |
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
(require 2htdp/image) | |
(require 2htdp/universe) | |
(require lang/posn) | |
(struct world (ufo tank)) | |
(define width 500) | |
(define height 500) | |
(define mtsn (empty-scene width height)) |
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
(require 2htdp/image) | |
(require 2htdp/universe) | |
(define background (empty-scene 200 50)) | |
(define width-of-world 200) | |
(define radius-of-wheel 2) | |
(define distance-between-wheel (* radius-of-wheel 5)) |
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
(:require [clojure.spec.alpha :as s]) | |
(s/def ::id string?) | |
(s/def ::link uri?) | |
(s/def ::tag (s/and string? | |
(complement empty?))) | |
(s/def ::tags (s/coll-of ::tag | |
:distinct true)) |
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 flow.core | |
(:gen-class) | |
(:require [clojure.string :as str])) | |
(require '[me.raynes.fs :as fs]) | |
;; (php? "akash.clj") | |
;;;;;;;;;;;;;;;;;;;;;;;; | |
;; identify php files ;; |
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 send-async-response [request async-handler] | |
(response/ok (:body (as-channel | |
request | |
{:on-open #(send! % (async-handler) {:close? true})})))) |