4.3 Lambdas

Use lambda expressions and interfaces to increase modularity in your code.

When defining a functional interface, use the @FunctionalInterface annotation:

@FunctionalInterface
public interface Footerface {
  public void doFoo();
}

When using a function pointer, always put the & (dereference operator) to avoid any confusion.

BAD:

foo(frc5431::myLambda);

GOOD:

foo(&frc5431::myLambda);

results matching ""

    No results matching ""