My favorites | Sign in
Logo
                
Changes to /trunk/PluralTestsAndExamples/src/edu/cmu/cs/plural/util/Lambda.java
r0 vs. r49   Edit
  Compare: vs.   Format:
Revision r49
Go to: 
Project members, sign in to write a code review
/trunk/PluralTestsAndExamples/src/edu/cmu/cs/plural/util/Lambda.java /trunk/PluralTestsAndExamples/src/edu/cmu/cs/plural/util/Lambda.java   r49
  1 /**
  2 * Copyright (C) 2007, 2008 Carnegie Mellon University and others.
  3 *
  4 * This file is part of Plural.
  5 *
  6 * Plural is free software; you can redistribute it and/or modify
  7 * it under the terms of the GNU General Public License version 2 as
  8 * published by the Free Software Foundation.
  9 *
  10 * Plural is distributed in the hope that it will be useful, but
  11 * WITHOUT ANY WARRANTY; without even the implied warranty of
  12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13 * General Public License for more details.
  14 *
  15 * You should have received a copy of the GNU General Public License
  16 * along with Plural; if not, see <http://www.gnu.org/licenses>.
  17 *
  18 * Linking Plural statically or dynamically with other modules is
  19 * making a combined work based on Plural. Thus, the terms and
  20 * conditions of the GNU General Public License cover the whole
  21 * combination.
  22 *
  23 * In addition, as a special exception, the copyright holders of Plural
  24 * give you permission to combine Plural with free software programs or
  25 * libraries that are released under the GNU LGPL and with code
  26 * included in the standard release of Eclipse under the Eclipse Public
  27 * License (or modified versions of such code, with unchanged license).
  28 * You may copy and distribute such a system following the terms of the
  29 * GNU GPL for Plural and the licenses of the other code concerned.
  30 *
  31 * Note that people who make modified versions of Plural are not
  32 * obligated to grant this special exception for their modified
  33 * versions; it is their choice whether to do so. The GNU General
  34 * Public License gives permission to release a modified version
  35 * without this exception; this exception also makes it possible to
  36 * release a modified version which carries forward this exception.
  37 */
  38 package edu.cmu.cs.plural.util;
  39
  40 import edu.cmu.cs.plural.annot.Perm;
  41 import edu.cmu.cs.plural.annot.Pure;
  42
  43 /**
  44 * A 'lambda,' or first-class function, that takes one argument and
  45 * returns one argument.
  46 *
  47 * @author Nels E. Beckman
  48 * @since Sep 9, 2008
  49 *
  50 * @param <I> The type of the input to this lambda.
  51 * @param <O> The type of the output from this lambda.
  52 */
  53 public interface Lambda<I, O> {
  54
  55 @Perm(requires="pure(this) * immutable(#0)",
  56 ensures="pure(this) * immutable(result)")
  57 public O call(@Pure I i);
  58
  59 }
Hosted by Google Code