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:
I hereby claim:
To claim this, I am signing this object:
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 |
#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) |
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 (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} |
(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)) |
package main | |
import "fmt" | |
func adder() func(int) int { | |
sum := 0 | |
return func(x int) int { | |
sum += x | |
return sum | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
void print_array(int* array, size_t size) | |
{ | |
for (unsigned i = 0; i < size; ++i) | |
{ | |
printf("%d\n", *array++); | |
} |
using System; | |
using System.Collections.Generic; | |
namespace HigherOrderProceduresDemo | |
{ | |
class Program | |
{ | |
static void Map(IEnumerable<int> list, Action<int> fn) | |
{ | |
foreach (var item in list) |
#lang sicp | |
;; Applicative order evaluation | |
(define (new-if predicate then-clause else-clause) | |
(cond (predicate then-clause) | |
(else else-clause))) | |
(define (sqrt-iter guess x) | |
(display guess) |