Skip to content

Commit

Permalink
docs: fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
arbelt committed Dec 2, 2024
1 parent b0d0407 commit dfaf9b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions R/lens.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
lens <- S7::new_class("lens",
package = packageName(),
properties = list(
"view" = class_function,
"set" = class_function
"view" = NULL | class_function,
"set" = NULL | class_function
))
13 changes: 0 additions & 13 deletions R/verbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ method(over, list(class_any, lens, class_function)) <- function(d, l, f) {
S7_dispatch()
})

#' Compose two lenses
#'
#' The resulting lens first applies the *left* lens, then the right lens.
#'
#' @param l First lens
#' @param m Second lens
#' @return A new lens
#' @export
#' @examples
#' d <- list(list(a = 1, b = 2), list(a = 4, b = 9))
#' l <- index_l(1)
#' m <- index_l("b")
#' view(d, l %.% m)
#' @importFrom S7 method method<-
method(`%.%`, list(lens, lens)) <- function(l, m) {
lens(
Expand Down

0 comments on commit dfaf9b1

Please sign in to comment.