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
// PARA TI MARTÍN c: | |
#include <stdlib.h> | |
#include <stdio.h> | |
struct abb { | |
int valor; | |
struct abb *izq, *der; | |
}; |
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
;;; P10 - Evaluación Matemática | |
(define mateval | |
(lambda (expr) | |
(cond | |
((number? expr) expr) | |
(else | |
(cond | |
((eqv? 'ADD (car expr)) (+ | |
(mateval (cadr expr)) |
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
;;; P9 - Inserción de Strings en Listas | |
(define compare-lex | |
(lambda (a b) | |
(string-ci<? (substring a 0 1) (substring b 0 1)))) | |
(define insert | |
(lambda (strlst lst) | |
(letrec ((combine (lambda (a b) | |
(cond |
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 sucesioncola | |
(lambda (n) | |
(letrec ([sc-do (lambda (a b c count) | |
(cond | |
((= count 0) c) | |
(else | |
(sc-do (+ a c) a b (- count 1)))))]) | |
(cond | |
((< n 3) n) | |
(else (sc-do 2 1 0 n)))) |
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
;;; p2.scm | |
(define codificador | |
(lambda (c e) | |
(cond | |
((null? e) '()) | |
((not (assq (car e) c)) (cons (car e) (codificador c (cdr e)))) | |
(else (cons (cdr (assq (car e) c)) (codificador c (cdr e))))))) | |
;;; Prueba |
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 once | |
(let ((called #f)) | |
(lambda (f) | |
(lambda args | |
(cond | |
((not called) | |
(set! called #t) | |
(apply f args)) | |
(else args)))))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// | |
// NSDictionary+NSNullUtility.h | |
// | |
// | |
// Created by Pablo Heredia on 12-07-12. | |
// Copyright (c) 2012. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |