Skip to content

Instantly share code, notes, and snippets.

View tylerlrhodes's full-sized avatar
🍕

Tyler Rhodes tylerlrhodes

🍕
View GitHub Profile
@tylerlrhodes
tylerlrhodes / higher-order-procedure.scm
Created July 8, 2018 18:40
Scheme demo of higher order procedure
(define (sum term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (+ result (term a)))))
(iter a 0))
(define (identity x) x)
(define (inc x) (+ 1 x))
#lang sicp
(define (append0 list1 list2)
(if (null? list1)
list2
(cons (car list1)
(append0 (cdr list1) list2))))
(append0 '(1 2 3) '(4 5 6))
; {1 2 3 4 5 6}
@tylerlrhodes
tylerlrhodes / SelectManyExample.cs
Created September 15, 2018 17:03
Demo of SelectMany function
using System;
using System.Collections.Generic;
using System.Linq;
namespace SelectManyExample
{
public class BookCase
{
public List<string> Books { get; set; } = new List<string>();
}
#lang sicp
(define (identity x) x)
(define (enumerate-interval low high)
(if (> low high)
nil
(cons low (enumerate-interval (+ low 1) high))))
(define (append list1 list2)
1) Start the debugee program (HelloWorld in this example)
in one command window:
% java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=4571 HelloWorld
2) In another window, attach your debugger (jdb in this example)
to the debugee via a socket:
% jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=4571

Keybase proof

I hereby claim:

  • I am tylerlrhodes on github.
  • I am tylerlrhodes (https://keybase.io/tylerlrhodes) on keybase.
  • I have a public key ASBiCF6r0YISZPg0VFNGwull09dmM3uR0XhkUZY38FJ2_wo

To claim this, I am signing this object: